Thursday, 5 January 2017

Write a program that generates the following table: 1990 135 1991 7290 1992 11300 1993 16200 Use a single cout statement for all output.

Leave a Comment


Question:

Write a program that generates the following table:
            1990      135
            1991     7290
            1992    11300
            1993    16200
Use a single cout statement for all output.


Explanation:
Below mention code is compiled in Visual Studio 2015 and Code Blocks 13.12,output snap is attached.. If any problem you feel and you want some explanation feel free to contact us.

Code:

/**************************************************|
/*************C++ Programs And Projects************|
***************************************************/
#include <iostream>
#include <iomanip>
using namespace std;
int main()
{
       cout << 1990 << setw(8) << 135 << endl
              << 1991 << setw(8) << 7290 << endl
              << 1992 << setw(8) << 11300 << endl
              << 1993 << setw(8) << 16200 << endl;
       return 0;

}


Output:



Related Articles:

Object-Oriented Programming in C++ Fourth Edition By Robert Lafore Solution Manual

C++ Books Solution

If You Enjoyed This, Take 5 Seconds To Share It

0 Questions: