13.07.2011, 06:16
Quote:
I got that 100%. I would have told you the same thing.
1. store the numbers in an array. new rand[] = {3, 7, 25, 66, 9}; 2. count the numbers in the array. new size = sizeof(rand); 3. generate random number from the total numbers in the array. new randn = random(size); 4. select the random number from the array index. new random_value = rand[randn]; How hard is that? |