Thursday, January 17, 2008

Randomization

srand(time(0)); // for seed based on current time

int k = 1 + rand() % 80; // for random number 1 to 80

No comments: