[cs23021-2] lab6 question

Mikhail Nesterenko mikhail at cs.kent.edu
Mon Oct 12 19:13:09 EDT 2009


Mikhail Nesterenko wrote:

> It is a typo. I just corrected it. The number should go from 0-99. The
> random numbers in this range are easily obtained if you take a
> remainder of the division of a large random number (returned by
> rand()) by 100. If you used 1-99 or 1-100 range you do not have to
> redo the lab, no points will be deducted for it.

Afer a bit of thinking, I modified the ranges to 1-100 because 0 is
used to denote unfilled entry in the array. The number in this range
is obtained as described above (using reminder) and adding one. For
example:

  randomInRange = bigRandomNumber % 100 + 1;

However, if you used one of the other ranges, no need to redo the
lab. No points will be deducted.

Thanks,
--
Mikhail


More information about the cs23021-2 mailing list