The do-while Statement (C++)
Executes a statement repeatedly until the specified termination condition (the expression) evaluates to zero.
do statement while ( expression ) ;
The test of the termination condition is made after each execution of the loop; therefore, a do-while loop executes one or more times, depending on the value of the termination expression. The do-while statement can also terminate when a break, goto, or return statement is executed within the statement body.
The expression must have arithmetic or pointer type. Execution proceeds as follows:
-
The statement body is executed.
-
Next, expression is evaluated. If expression is false, the do-while statement terminates and control passes to the next statement in the program. If expression is true (nonzero), the process is repeated, beginning with step 1.
I have to write a corret condition for the while loop... please help
- 3/17/2011
- Queos
- 12/9/2008
- Daniel Usikov
- 12/9/2008
- Daniel Usikov
- 12/9/2008
- Daniel Usikov
- 12/9/2008
- Daniel Usikov