C++ examples for Statement:do while
The general syntax of a do-while loop is
do { <statements>; } while (<expression>);
#include <iostream> #include <cmath> using namespace std ; int main(){//from ww w .j ava 2s.c o m int count = 10; do { cout << count ; cout << "\n"; count --; } while ( count >= 1); cout << " Blast off !\n"; return 0; }