#include <iostream.h>
using namespace std;
int main()
{
char yes;
int rate,code,labour,charge,hour,cost;
cout<<"do you want to borrow any material from us?"<<endl;
cout<<"if yes press y."<<endl;
cin>>yes;
if(yes=='y'||yes=='Y')
{
cout<<"\nwe have following materials."<<endl;
cout<<"code material"<<endl;
cout<<" 1 electricals"<<endl;
cout<<" 2 electronics"<<endl;
cout<<" 3 construction"<<endl;
cout<<" 4 sanitary"<<endl;
cout<<"\nenter code of your desired material."<<endl;
cin>>code;
if(code==1)
{
cost=240;
rate=45;
hour=2;
labour=rate*hour;
charge=labour+cost;
cout<<"\ncost of electrical material=$240"<<endl;
cout<<"assumption rate=$45 per hour"<<endl;
cout<<"hours of work=2 hr"<<endl;
cout<<" labour= "<<"$"<<labour<<endl;
cout<<"total charges= "<<"$"<<charge<<endl;
}
if(code==2)
{
cost=280;
rate=45;
hour=3;
labour=rate*hour;
charge=labour+cost;
cout<<"\ncost of electronic material=$280"<<endl;
cout<<"assumption rate=$45 per hour"<<endl;
cout<<"hours of work=3 hr"<<endl;
cout<<" labour="<<"$"<<labour<<endl;
cout<<"total charges="<<"$"<<charge<<endl;
}
if(code==3)
{
cost=350;
rate=45;
hour=5;
labour=rate*hour;
charge=labour+cost;
cout<<"\ncost of electronic material=$240"<<endl;
cout<<"assumption rate=$45 per hour"<<endl;
cout<<"hours of work=6 hr"<<endl;
cout<<" labour="<<"$"<<labour<<endl;
cout<<"total charges="<<"$"<<charge<<endl;
}
if(code==4)
{
cost=310;
rate=45;
hour=4;
labour=rate*hour;
charge=labour+cost;
cout<<"\ncost of electronic material=$240"<<endl;
cout<<"assumption rate=$45 per hour"<<endl;
cout<<"hours of work=6 hr"<<endl;
cout<<" labour= "<<"$"<<labour<<endl;
cout<<"total charges= "<<"$"<<charge<<endl;
}
}
else
{
cout<<"\ntara mou hay kuj lan aala."<<endl;
}
system("pause");
}
No comments:
Post a Comment