|
From: Abhijit S. <mu...@gm...> - 2003-06-18 20:37:02
|
Greets, Artificial Stupidity, I'm Real Happy (to meet you). > HI, does anyone know a good way to use rnd() to generate non-repeating random numbers - in the area of about a thousand. rand()%1000; // Gives a number from 0 - 999 Also, at the beginning of the program, do srand(time(NULL)); This is to initialize (seed) the random number so that you get different sequences everytime you run the program. HTH. ________________________________________ Abhijit Shylanath http://mudeth.tripod.com/ |