Restaurant Menu.

#include<iostream>
#include<string>
using namespace std;
int main(){
string order;
int quantity,price,pay,change,bill;
cout<<"Order The Below"<<endl;
cout<<"Burgur = 30$ (B/b for burgur)"<<endl;
cout<<"Fries = 10$ (F/f for fries)"<<endl;
cout<<"Drink = 5$ (D/d for drink)"<<endl;
cin>>order;
if(order=="B"||order=="b")
price=30;
else if(order=="F"||order=="f")
price=10;
else if(order=="D"||order=="d")
price=5;
else 
cout<<"Invalid Order"<<endl;
cout<<"How Many? "<<endl;
cin>>quantity;
bill=price*quantity;
cout<<"Pay Your Bill = "<<bill<<endl;
cout<<"Payment Please "<<endl;
cin>>pay;
change=pay-bill;
if(change<0)
cout<<"Invavlid Amount"<<endl;
else
cout<<"Your Change Is = "<<change<<endl;
return 0;
}

Comments

Popular Posts