‘while’ construct
Loop structure with pre-test condition.
while (expression)
statement ;
expression is loop condition.
If expression is true, statement in loop body is executed, and expression tested again.
If expression is false, loop terminates.
Previous slide
Next slide
Back to first slide
View graphic version