For statement : For « Language « C++






For statement

For statement
#include <iostream>
#include <iomanip>
using namespace std;
int main()
{
   double rate = 1.15;   
                         
   cout << fixed << setprecision(2);
   cout << "Euro             Dollar\n";
   for( int euro = 1; euro <= 5; ++euro)
     cout << "          " << euro
          << "          " << euro*rate << endl;
   return 0;
} 

           
       








Related examples in the same category

1.For loop with int value type as the controlFor loop with int value type as the control
2.for loop: A Multiplication Tablefor loop: A Multiplication Table
3.Generating digit numbers of equally total digits