The “while” loop, Syntax
•
•
•
•
while( boolean_expression )
•
{
•
statements…
•
}
•
•
Typically the the block of statements will alter
the boolean_expression such that it will
eventually be false. If this does not happen
an “infinite loop” will occur.
•
x = 2. x = 1