Program to illustrate the use of endl and setw


     # include <iostream.h>
     #include<iomanip.h>                  //for setw
     int main( )
     {
        int Basic = 950, Allowance = 95, Total = 1045;
        cout << setw(10)<<"Basic"<<setw(10)<< Basic<<endl
            << setw(10)<<" Allowance"<<setw(10)<< Allowance <<endl
             << setw(10)<<" Total"<<setw(10)<< Total <<endl;
                   return 0;
      }

0 comments:

Post a Comment

 
 
 
 


Copyright © 2012 http://codeprecisely.blogspot.com. All rights reserved |Term of Use and Policies|