Suppose you want to make a random 9 digit number, using every number from 1 to 9 exactly once. You have a process called random(top) that gives a random number up to top (if top was 5, it would give random numbers from 1 to 5)
a) How could you do this?
b) If top couldn't be more than 9, how could you do this using random(top) only 9 times (or less)?
(In reply to re: Words too!
Somebody had to write the library function, didn't they?
(and, logically speaking, the statemtent places the library routine writer not worth his or her salt.)
Posted by Charlie
on 2003-05-02 16:20:09