For StatementsStatementsIf StatementsWhile Statements

While Statements

< while statement > -> while ( < expression > )
< statement part >

The execution of a while loop begins with the evaluation of the expression included in the statement's header. If this expression's value is zero, execution of the while loop terminates immediately. Otherwise, the statement or statement list included is executed repeatedly until the value of the expression becomes zero.


Computer Science 434
Department of Computer Science
Williams College

For StatementsStatementsIf StatementsWhile Statements