Executing Loops

How many times will the body of the loop below execute?

for ( int index = 0; index < 10; index++)
{
if (rand() % 3 < 3)
continue;
else
break;
}
10

rand() % 3 < 3 will always be true.
I don't get it. Doesn't it take less time for the OP to read chapter 1 than to type out all these simple homework questions???
Topic archived. No new replies allowed.