The do-while Statement


The do-while loop has the following form:

do
 {
  statements;
 } while (condition);

where:

While the condition is true, the statements are repeatedly excecuted. When the condition becomes false, the loop is terminated and execution resumes at the statement after the while loop. The condition is tested at the bottom the loop, which means that in all circumstances, the loop is executed at least once.