But that's basically just another way of doing
Code:num1 = rand() % 100;
Printable View
But that's basically just another way of doing
Code:num1 = rand() % 100;
without calling rand twice.
so it would be like this:Code:srand(time(NULL)); // allows for random number generation
num1 = rand();
num1 %= 100;
num2 = rand(); // picks a second random number that will not be the first
num2 %= 100;
Yes, perhaps that is what the teacher meant.
Anyway, it can be done either way. You can pick one.