C++ while statement with int type

Description

C++ while statement with int type

#include <iostream>
using namespace std;
int main()//from  w  w w. ja  va2 s  .  co m
{
   int i;
   i = 10;
   while (i >= 1)
   {
      cout << i << "  ";
      i--;            // subtract 1 from i
   }
   return 0;
}



PreviousNext

Related