Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <Windows.h>
- using namespace std;
- int main()
- {
- float x,y;
- cout<<"Please enter the length and width of room 1\n";
- cin>>x;
- cin>>y;
- char ch;
- cout<<"Please enter the color\n";
- cin>>ch;
- char ch1;
- cout<<"Please enter the type\n";
- cin>>ch1;
- float a,b;
- cout<<"Please enter the length and width of room 2\n";
- cin>>a;
- cin>>b;
- char ch2;
- cout<<"Please enter the color\n";
- cin>>ch2;
- char ch3;
- cout<<"Please enter the type\n";
- cin>>ch3;
- float w,z;
- cout<<"Please enter the length and width of room 3\n";
- cin>>w;
- cin>>z;
- char ch4;
- cout<<"Please enter the color\n";
- cin>>ch4;
- char ch5;
- cout<<"Please enter the type\n";
- cin>>ch5;
- cout<<"Room #\t"<<"Length\t"<<"Width\t"<<"Area\t"<<"Color\t"<<"Type\t"<<"Price/meter\t"<<"Subtotal"<<endl;
- cout<<"--------------------------------------------------------------------------------";
- cout<<"1\t"<<x<<"\t"<<y<<"\t"<<x*y<<"\t"<<ch<<"\t"<<ch1<<"\t";
- if(ch1=='c')
- cout<<50;
- else
- cout<<100;
- cout<<"\t"<<x*y*ch1<<endl;
- cout<<"2\t"<<a<<"\t"<<b<<"\t"<<a*b<<"\t"<<ch2<<"\t"<<ch3<<"\t";
- if(ch3=='c')
- cout<<50;
- else
- cout<<100;
- cout<<"\t"<<a*b*ch3<<endl;
- cout<<"3\t"<<w<<"\t"<<z<<"\t"<<a*b<<"\t"<<ch4<<"\t"<<ch5<<"\t";
- if(ch5=='c')
- cout<<50;
- else
- cout<<100;
- cout<<"\t"<<w*z*ch3<<endl;
- Sleep (10000);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement