Posted on 1997-05-02
I am trying to write a program which will print out a different random number each time it is executed.
Here is what I have so far:
unsigned int number;
number = rand() % 100;
Unfortunately this question has the effect of only changing the random number once every second, and so if this program is run five times within one second the same number is generated.
If somebody could suggest a way of writing this program so that a different number is generated EVERY time it is run.
(intended platform is Unix)