How do you generate a random number?
Code:int number = rand();
ok
the equation for random number isCode:#include <time.h> int main() { srand(time(0)); // seed it int x = (rand() % (100 - 1 + 1) ) + 1; return 0; }
(rand() % (high - low + 1)) + low
nextus, the samurai warrior
I wrote a tutorial on this on the mainpage, perhaps you should look before you leap?