Next: Relational operators Up: Decisions Previous: for loop

do-while loop

This loop is always obeyed at least once because the test is at the end. The syntax is

   do
      statement
   while (expression);

Once again, the statement must modify the expression's value if this is to terminate. This is the least common form of loop.



Next: Relational operators Up: Decisions Previous: for loop


maspjw@
Tue Sep 27 15:29:34 BST 1994