Tuesday, 9 June 2015

Program that prints first 20 integers in reverse order (using while loop )



Code for Program that prints first 20 integers in reverse order (using while loop ) in C++ Programming



 



 
 #include<iostream.h>
 #include<conio.h>

 /*************************************************************************//*************************************************************************///-----------------------------  Main( )  -------------------------------///*************************************************************************//*************************************************************************/

 main()
    {
       clrscr();

       cout<<"\n The first twenty integers in reverse order are as follows :"<<endl;

       int count=20;

       while(count>=1)
      {
         cout<<"  "<<count;
         count--;
      }

       getch();
       return 0;
    }

No comments:

Post a Comment