so number1 will equal to 1 + 49%10 == 10
then the same with number2 will equal to 10
multresult == 10*10 == 100
There'll only be a limited number of cases where multresult <= highestNum based on your code...
ps: Another thing to note is that calling rand() twice in a row like that will return the same value. I'm not sure if that's a desired result. If it's not then u'll have to seed it between calls.
@soranz
Er, no, calling rand() twice in a row like that is perfectly fine (and you'll get different values each time).
You'll get the same value if you were to do something like
1 2 3 4
srand(time(0));
number1 = 1+rand() % highestNum;
srand(time(0)); // Reseed...with the same value (most of the time, at least) as before
number2 = 1+rand() % highestNum;
So you should only seed rand once (typically at the start of the program).