1/31/00
COM1100 Winter2000 Yuhong Yin
18
While
statement
n
Used to repeat a statement (or black) while
an expression is true (not zero)
n
Syntax :
n
while (condition) {
n
statements;
n
}
n
purpose: execute the statements while the
condition remains true.
n