do statement

do statement Test-at-bottom loop statement

statement := do statement while ( expression ) ;

The do statement is a loop that executes statement, then tests expression. The loop iterates while expression is true and ends if expression is false. The loop body always executes at least once.


do {

  cout << "Number: ";

  if (cin >> num)


} while(cin);

See Also

break, continue, expression, for, statement, while, Chapter 4