Sunday, April 4, 2021

Food order project using c++ (POP) (5)

 #include<iostream>

#include<string>

void info();//function for information

void brekfstmenu();//function for breakfast menu

void lunchmenu();//function for lunch menu

void dinnermenu();//function for dinner menu

using namespace std;

int main()

{

int press,choice,Bm,Lm,Dm,i,balance=1000;

cout<<"\t\t\t\t\t$$$$$$$$$$$$$$$$$$$$$$$$$"<<endl;

cout<<"\t\t\t\t\tWELCOME TO MY HOTEL"<<endl;

cout<<"\t\t\t\t\t$$$$$$$$$$$$$$$$$$$$$$$$$"<<endl;

cout<<"\t\t\t\t\t\t\t\t\t\t____________________________________"<<endl;

cout<<"\t\t\t\t\t\t\t\t\t\tthis project is made by hamza rehman:"<<endl;

cout<<"\t\t\t\t\t\t\t\t\t\t____________________________________"<<endl;

cout<<"\n\n\n\n\n";

info();//here we call our function of defination

system("cls");

cout<<"\n\n\n\n\t\t\t\t1.check the menu:"<<endl;

cout<<"\t\t\t\t2.check your balance:"<<endl;

cout<<"\n\n\t\t\t\t\t\t\tenter you choice here:";

cin>>press;

if(press==1)//menu of hr hotel

{

system("cls");//its for new page

cout<<"\t\t\t\t\t################"<<endl;

cout<<"\t\t\t\t\tMenu of HR hotel"<<endl;

cout<<"\t\t\t\t\t################"<<endl;

cout<<"\n\n\n\n\n";

cout<<"\t\t\t1.Breakfast menu:"<<endl;

cout<<"\t\t\t2.Lunch menu:"<<endl;

cout<<"\t\t\t3.Dinner menu:"<<endl;

cout<<"\n\n\n";

cout<<"\t\t\t\t\tDear customer enter your choice:";

cin>>choice;

if(choice==1)      //menu of hr hotel for breakfast

{

system("cls");

cout<<"\t\t\t\t**************"<<endl;

cout<<"\t\t\t\tBreakfast menu"<<endl;

cout<<"\t\t\t\t**************"<<endl;

cout<<"\n\n\n\n";

brekfstmenu();//here we call our function

cout<<"\n\n\n";

cout<<"\t\t\t\tplease enter your choice:";

cin>>Bm;

switch(Bm)

{

case 1:

cout<<"you buy boiled eggs RS:20"<<endl;

cout<<endl;

cout<<"thanks for choice the HR hotel"<<endl;

cout<<endl;

balance=balance-20;

cout<<"your new balance is:"<<balance;

break;

case 2:

cout<<"you buy fried eggs RS:25";

cout<<endl;

cout<<"thanks for choice the HR hotel"<<endl;

cout<<endl;

balance=balance-25;

cout<<"your new balance is:"<<balance;

break;

case 3:

cout<<"you buy one bread RS:15";

cout<<endl;

cout<<"thanks for choice the HR hotel"<<endl;

cout<<endl;

balance=balance-15;

cout<<"your new balance is:"<<balance;

break;

case 4:

cout<<"you buy one tea cup RS:40";

cout<<endl;

cout<<"thanks for choice the HR hotel"<<endl;

cout<<endl;

balance=balance-40;

cout<<"your new balance is:"<<balance;

break;

case 5:

cout<<"you buy glass of mango juice RS:80";

cout<<endl;

cout<<"thanks for choice the HR hotel"<<endl;

cout<<endl;

balance=balance-80;

cout<<"your new balance is:"<<balance;

break;

case 6:

cout<<"you buy glass of apple juice RS:70";

cout<<endl;

cout<<"thanks for choice the HR hotel"<<endl;

cout<<endl;

balance=balance-70;

cout<<"your new balance is:"<<balance;

break;

case 7:

cout<<"you buy glass of orang juice RS:60";

cout<<endl;

cout<<"thanks for choice the HR hotel"<<endl;

cout<<endl;

balance=balance-60;

cout<<"your new balance is:"<<balance;

break;

case 8:

cout<<"you buy glass of milk RS:50";

cout<<endl;

cout<<"thanks for choice the HR hotel"<<endl;

cout<<endl;

balance=balance-50;

cout<<"your new balance is:"<<balance;

break;

case 9:

cout<<"you buy bottel of jam RS:100";

cout<<endl;

cout<<"thanks for choice the HR hotel"<<endl;

cout<<endl;

balance=balance-100;

cout<<"your new balance is:"<<balance;

break;

case 10:

cout<<"you buy a roti RS:10";

cout<<endl;

cout<<"thanks for choice the HR hotel"<<endl;

cout<<endl;

balance=balance-10;

cout<<"your new balance is:"<<balance;

break;

default:

cout<<"you entered a wrong number:"<<endl;

break;

}

}

else if(choice==2)         //menu of hr hotel for lunch

{

system("cls");

cout<<"\t\t\t\t***********"<<endl;

cout<<"\t\t\t\tLunch menu"<<endl;

cout<<"\t\t\t\t***********"<<endl;

cout<<"\n\n\n\n";

lunchmenu();//here we call our function

cout<<"\t\t\t\tplease enter your choice:"<<endl;

cin>>Lm;

switch(Lm)

{

case 1:

cout<<"you buy Birani+raita+salad RS:400"<<endl;

cout<<endl;

cout<<"thanks for choice the HR hotel"<<endl;

cout<<endl;

balance=balance-400;

cout<<"your new balance is:"<<balance;

break;

case 2:

cout<<"you buy one kebab RS:30";

cout<<endl;

cout<<"thanks for choice the HR hotel"<<endl;

cout<<endl;

balance=balance-30;

cout<<"your new balance is:"<<balance;

break;

case 3:

cout<<"you buy chicken kerchi+salad RS:500";

cout<<endl;

cout<<"thanks for choice the HR hotel"<<endl;

cout<<endl;

balance=balance-500;

cout<<"your new balance is:"<<balance;

break;

case 4:

cout<<"you buy a NaaN RS:20";

cout<<endl;

cout<<"thanks for choice the HR hotel"<<endl;

cout<<endl;

balance=balance-20;

cout<<"your new balance is:"<<balance;

break;

case 5:

cout<<"you buy Nihari+salad RS:200";

cout<<endl;

cout<<"thanks for choice the HR hotel"<<endl;

cout<<endl;

balance=balance-200;

cout<<"your new balance is:"<<balance;

break;

case 6:

cout<<"you buy halemm+roti+salad RS:150";

cout<<endl;

cout<<"thanks for choice the HR hotel"<<endl;

cout<<endl;

balance=balance-150;

cout<<"your new balance is:"<<balance;

break;

case 7:

cout<<"you buy matar pulao+raita+salad RS:300";

cout<<endl;

cout<<"thanks for choice the HR hotel"<<endl;

cout<<endl;

balance=balance-300;

cout<<"your new balance is:"<<balance;

break;

case 8:

cout<<"you buy butter chicken+roti+salad RS:600";

cout<<endl;

cout<<"thanks for choice the HR hotel"<<endl;

cout<<endl;

balance=balance-600;

cout<<"your new balance is:"<<balance;

break;

case 9:

cout<<"you buy bottel of water RS:80";

cout<<endl;

cout<<"thanks for choice the HR hotel"<<endl;

cout<<endl;

balance=balance-80;

cout<<"your new balance is:"<<balance;

break;

case 10:

cout<<"you buy roti RS:10";

cout<<endl;

cout<<"thanks for choice the HR hotel"<<endl;

cout<<endl;

balance=balance-10;

cout<<"your new balance is:"<<balance;

break;

default:

cout<<"you entered a wrong number:"<<endl;

break;

}

}

else if(choice==3)  //menu of hr hotel for dinner

{

system("cls");

cout<<"\t\t\t\t***********"<<endl;

cout<<"\t\t\t\tDinner menu"<<endl;

cout<<"\t\t\t\t***********"<<endl;

cout<<"\n\n\n\n";

dinnermenu();//here we call our function

cout<<"\t\t\t\tplease enter your choice:";

cin>>Dm;

switch(Dm)

{

case 1:

cout<<"you buy Birani+raita+salad RS:400"<<endl;

cout<<endl;

cout<<"thanks for choice the HR hotel"<<endl;

cout<<endl;

balance=balance-400;

cout<<"your new balance is:"<<balance;

break;

case 2:

cout<<"you buy one kebab RS:30";

cout<<endl;

cout<<"thanks for choice the HR hotel"<<endl;

cout<<endl;

balance=balance-30;

cout<<"your new balance is:"<<balance;

break;

case 3:

cout<<"you buy chicken kerchi+salad RS:500";

cout<<endl;

cout<<"thanks for choice the HR hotel"<<endl;

cout<<endl;

balance=balance-500;

cout<<"your new balance is:"<<balance;

break;

case 4:

cout<<"you buy a NaaN RS:20";

cout<<endl;

cout<<"thanks for choice the HR hotel"<<endl;

cout<<endl;

balance=balance-20;

cout<<"your new balance is:"<<balance;

break;

case 5:

cout<<"you buy pizza RS:200";

cout<<endl;

cout<<"thanks for choice the HR hotel"<<endl;

cout<<endl;

balance=balance-200;

cout<<"your new balance is:"<<balance;

break;

case 6:

cout<<"you buy halemm+roti+salad RS:150";

cout<<endl;

cout<<"thanks for choice the HR hotel"<<endl;

cout<<endl;

balance=balance-150;

cout<<"your new balance is:"<<balance;

break;

case 7:

cout<<"you buy burger RS:300";

cout<<endl;

cout<<"thanks for choice the HR hotel"<<endl;

cout<<endl;

balance=balance-300;

cout<<"your new balance is:"<<balance;

break;

case 8:

cout<<"you buy beef chicken+roti+salad RS:600";

cout<<endl;

cout<<"thanks for choice the HR hotel"<<endl;

cout<<endl;

balance=balance-600;

cout<<"your new balance is:"<<balance;

break;

case 9:

cout<<"you buy bottel of water RS:80";

cout<<endl;

cout<<"thanks for choice the HR hotel"<<endl;

cout<<endl;

balance=balance-80;

cout<<"your new balance is:"<<balance;

break;

case 10:

cout<<"you buy roti RS:10";

cout<<endl;

cout<<"thanks for choice the HR hotel"<<endl;

cout<<endl;

balance=balance-10;

cout<<"your new balance is:"<<balance;

break;

default:

cout<<"you entered a wrong number:"<<endl;

break;

}

}

}

else if(press==2)

{

system("cls");

    cout<<"\t\t\t\t**************"<<endl;

cout<<"\t\t\t\t\tbalance"<<endl;

cout<<"\t\t\t\t**************"<<endl;

cout<<"\n\nyou have"<<" "<<balance<<" "<<"rupees in your account"<<endl;

}

else

{

cout<<"enter wrong choice";

}

}

void info()//function defination here we define our function

{

int num;

string address;

string name;

cout<<"Dear customer enter your name:";

cin>>name;

cout<<endl;

cout<<"Hello"<<" "<<name<<" "<<" Welcome in my HR hotel"<<endl;

cout<<endl;

cout<<"Dear enter your address:";

cin>>address;

cout<<endl;

}

void brekfstmenu()//function defination here we define our function

{

cout<<"\t\t1.boiled eggs RS:20"<<endl;

cout<<"\t\t2.fried eggs RS:25"<<endl;

cout<<"\t\t3.one bread RS:15"<<endl;

cout<<"\t\t4.one tea cup RS:40"<<endl;

cout<<"\t\t5.glass of mango juice RS:80"<<endl;

cout<<"\t\t6.glass of apple juice RS:70"<<endl;

cout<<"\t\t7.glass of orang juice RS:60"<<endl;

cout<<"\t\t8.glass of milk RS:50"<<endl;

cout<<"\t\t9.bottel of jam RS:100"<<endl;

cout<<"\t\t10.roti RS:10"<<endl;

}

void lunchmenu()//function defination here we define our function

{

cout<<"\t\t1.Birani+raita+salad RS:400"<<endl;

cout<<"\t\t2.one kebab RS:30"<<endl;

cout<<"\t\t3.chicken kerchi+salad RS:500"<<endl;

cout<<"\t\t4.NaaN RS:20"<<endl;

cout<<"\t\t5.Nihari+salad RS:200"<<endl;

cout<<"\t\t6.halemm+roti+salad RS:150"<<endl;

cout<<"\t\t7.matar pulao+raita+salad RS:300"<<endl;

cout<<"\t\t8.butter chicken+roti+salad RS:600"<<endl;

cout<<"\t\t9.bottel of water RS:80"<<endl;

cout<<"\t\t10.roti RS:10"<<endl;

}

void dinnermenu()//function defination here we define our function

{

cout<<"\t\t1.Birani+raita+salad RS:400"<<endl;

cout<<"\t\t2.one kebab RS:30"<<endl;

cout<<"\t\t3.chicken kerchi+salad RS:500"<<endl;

cout<<"\t\t4.one NaaN RS:20"<<endl;

cout<<"\t\t5.pizza RS:200"<<endl;

cout<<"\t\t6.halemm+roti+salad RS:150"<<endl;

cout<<"\t\t7.burger RS:300"<<endl;

cout<<"\t\t8.beef chicken+roti+salad:600"<<endl;

cout<<"\t\t9.bottel of water RS:80"<<endl;

cout<<"\t\t10.roti RS:10"<<endl;

}

No comments:

Post a Comment