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