for (x = 0; x < 20; x++)
{
for (y = 0; y < 30; y++)
{
if (y > 10)
break;
cout << '*' << endl;
}
}
Since 10 is not greater than 10, I multiplied 12 by 20 and got 240 stars as my answer. But, the answer is 220(11 times 20) stars. How come the inner loop interates 11 times and not 12 like I thought?