1/31/00
COM1100 Winter2000 Yuhong Yin
21
do-while statement
nSometimes, we want to execute the loop body at least once and perform the loop test after the body was executed.
nSyntax
n do {
n statements;
n }  while (condition)  
npurpose: execute the statements, then test the condition, and repeat the statement while the condition remains true.
n