The for - while loop equivalence
•
for (int i = 0; i < 100; i++ )
•
{
•
statements…
•
}
•
•
int i = 0;
•
while( i < 100 )
•
{
•
statements…
•
i++;
•
}
These two sections of
code do exactly the
same thing