Advertisement
Vita94

Abo Zanih

Sep 21st, 2013
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.35 KB | None | 0 0
  1. #include <iostream>
  2. #include <Windows.h>
  3. using namespace std;
  4. int main()
  5. {
  6.     float x,y;
  7.     cout<<"Please enter the length and width of room 1\n";
  8.     cin>>x;
  9.     cin>>y;
  10.     char ch;
  11.     cout<<"Please enter the color\n";
  12.     cin>>ch;
  13.     char ch1;
  14.     cout<<"Please enter the type\n";
  15.     cin>>ch1;
  16.  
  17.         float a,b;
  18.     cout<<"Please enter the length and width of room 2\n";
  19.     cin>>a;
  20.     cin>>b;
  21.     char ch2;
  22.     cout<<"Please enter the color\n";
  23.     cin>>ch2;
  24.     char ch3;
  25.     cout<<"Please enter the type\n";
  26.     cin>>ch3;
  27.  
  28.         float w,z;
  29.     cout<<"Please enter the length and width of room 3\n";
  30.     cin>>w;
  31.     cin>>z;
  32.     char ch4;
  33.     cout<<"Please enter the color\n";
  34.     cin>>ch4;
  35.     char ch5;
  36.     cout<<"Please enter the type\n";
  37.     cin>>ch5;
  38.  
  39.     cout<<"Room #\t"<<"Length\t"<<"Width\t"<<"Area\t"<<"Color\t"<<"Type\t"<<"Price/meter\t"<<"Subtotal"<<endl;
  40.     cout<<"--------------------------------------------------------------------------------";
  41.     cout<<"1\t"<<x<<"\t"<<y<<"\t"<<x*y<<"\t"<<ch<<"\t"<<ch1<<"\t";
  42.     if(ch1=='c')
  43.         cout<<50;
  44.     else
  45.         cout<<100;
  46.     cout<<"\t"<<x*y*ch1<<endl;
  47.     cout<<"2\t"<<a<<"\t"<<b<<"\t"<<a*b<<"\t"<<ch2<<"\t"<<ch3<<"\t";
  48.         if(ch3=='c')
  49.         cout<<50;
  50.     else
  51.         cout<<100;
  52.         cout<<"\t"<<a*b*ch3<<endl;
  53.         cout<<"3\t"<<w<<"\t"<<z<<"\t"<<a*b<<"\t"<<ch4<<"\t"<<ch5<<"\t";
  54.         if(ch5=='c')
  55.         cout<<50;
  56.     else
  57.         cout<<100;
  58.         cout<<"\t"<<w*z*ch3<<endl;
  59.     Sleep (10000);
  60.     return 0;
  61. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement