C++ examples for Statement:do while
Do...while repetition statement
#include <iostream> int main(int argc, const char *argv[]) { int counter = 1; do {/*w ww . j a v a 2 s .c om*/ std::cout << counter << " "; ++counter; } while (counter <= 10); std::cout << std::endl; return 0; }