Sie sind auf Seite 1von 2

//This program entails the display of Total Sales of the given Quarter.

#include <iostream>
#include <iomanip>
#include <cmath>
using namespace std;

int main ()
{

cout << " *Salesman* *Quarter 1* *Quarter 2* *Quarter 3*


*Quarter 4* " <<endl;
cout << setw(30) << " Jan Feb Mar " << setw (20) << " Apr May June " <<
setw(20)<< " July Aug Sept " << setw(20) << " Oct Nov Dec " << endl;
cout << " \nPete " << setw(26) << " 0.23 0.25 0.26 " << setw(19) << " 0.28
0.25 0.23 " << setw(20) << " 0.20 0.98 1.00 " << setw(21) << " 1.03 1.20 1.25
"<<endl;
cout << " \nSally"<< setw(26) << " 1.54 1.50 1.51 " << setw(19) << " 1.09
1.00 1.01 " << setw(20) << "0.95 0.99 1.05 " << setw(21) << " 1.00 1.03 1.45
"<<endl;
cout << " \nJose "<< setw(26) << " 0.33 0.40 0.41 " << setw(19) << " 0.52
0.50 0.48 " << setw(21) << " 0.53 0.50 0.68 " << setw(20) << " 0.70 0.80 0.99
"<<endl;
cout << " \nLinda "<< setw(25) << " 2.05 1.98 1.97 " << setw(19) << " 2.00
2.01 2.01 " << setw(21) << " 2.03 2.00 1.99 " << setw(20) << " 2.00 2.00 2.01
"<<endl;
cout << " \nNelson "<< setw(24) << " 0.50 0.62 0.60 " << setw(19) << " 0.59
0.61 0.62 " << setw(21) << " 0.64 0.75 0.78 " << setw(20) << " 0.80 0.88 0.90
"<<endl;
cout << endl << endl;
cout << setw(50)<< " ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ "<<endl<<endl;

int a,b,c,d,ans;

cout << " *Salesman* || *Quarter 1* || *Quarter 2* || *Quarter


3* || *Quarter 4* || *Total* || *Average* || *Min* || *Max*
" <<endl;

cout << " \nPete " << setw(26) << a << setw(19) << b << setw(20) << c <<
setw(21) << d <<endl;
cout << " \nSally"<< setw(26) << " 1.54 1.50 1.51 " << setw(19) << " 1.09
1.00 1.01 " << setw(20) << "0.95 0.99 1.05 " << setw(21) << " 1.00 1.03 1.45
"<<endl;
cout << " \nJose "<< setw(26) << " 0.33 0.40 0.41 " << setw(19) << " 0.52
0.50 0.48 " << setw(21) << " 0.53 0.50 0.68 " << setw(20) << " 0.70 0.80 0.99
"<<endl;
cout << " \nLinda "<< setw(25) << " 2.05 1.98 1.97 " << setw(19) << " 2.00
2.01 2.01 " << setw(21) << " 2.03 2.00 1.99 " << setw(20) << " 2.00 2.00 2.01
"<<endl;
cout << " \nNelson "<< setw(24) << " 0.50 0.62 0.60 " << setw(19) << " 0.59
0.61 0.62 " << setw(21) << " 0.64 0.75 0.78 " << setw(20) << " 0.80 0.88 0.90
"<<endl;
cout << endl<<endl;
cout << " ||Total|| "<<endl;
cout << " ||Average|| "<<endl;
cout << " ||Min|| "<<endl;
cout << " ||Max|| "<<endl;
ans = 0.23 + 0.25 + 0.26;
ans==a;
cin >> setprecision(2) >> a;
}

Das könnte Ihnen auch gefallen