Norm,

When generating random numbers, one would use the rand() function from the standard library. This will output a random number from RAND_MIN to RAND_MAX. However; let's say one wants to restrict the range of all random numbers, say, for a die. You would want the restriction to be from 1 to 6; however, C allows the range to be from 0 to 5, so one could add one to the rand() function.

Now, the question is: How would one restrict the range of random integers generated by the processor?