1/31/00
COM1100 Winter2000 Yuhong Yin
19
while loop
nWhen the while statement is entered, the test condition is evaluated.
nIf the test succeeds, the loop body is executed.
nThen the test is performed again.
nAs long as it is successful, the body of the while statement is executed. nAs soon as the test fails, the next statement after the end of the body is executed.
n