August 2003
Beginner
600 pages
12h 55m
English
In some situations, you won't know the exact number of times a loop needs to be performed—not even when the loop begins. When you need to create such a loop, using the do...while loop is the best solution.
The do...while comes in a number of flavors. Its most basic form has the following syntax:
do statement while (expression);
The following syntax is used to execute multiple statements:
do
{
[Statements]
} while (expression);
|
A do...while loop without some sort of exit mechanism or defined condition is an endless loop. In its most basic form, nothing is present ...
Read now
Unlock full access