June 2006
Intermediate to advanced
1344 pages
42h 52m
English
The Do...Loop While repetition statement is similar to the While statement and Do While...Loop statement. In the While and Do While...Loop statements, the loop-continuation condition is tested at the beginning of the loop, before the body of the loop is performed. The Do...Loop While statement tests the loop-continuation condition after the loop body is performed; therefore, in a Do...Loop While statement, the loop body is always executed at least once. When a Do...Loop While statement terminates, execution continues with the statement after the Loop While clause. The program in Fig. 6.12 uses a Do...Loop While statement to output the values 1–5.
|
|
Read now
Unlock full access