c++ program that would display the menu
of a restaurant
1. guys sorry about my post earlier . this is what i did with my program but i
dont think my equation is correct because whenever i want to get
2. the total amount due it always give the wrong amount . i dont thinks this
equation is correct "amount=amount+price*quant;"
3. guys i need your help. Thank you!
4.
5.
6.
7.
#include<iostream>
#include <windows.h>
using namespace std;
void gotoxy(long x, long y)
COORD pos = {x, y};
SetConsoleCursorPosition(GetStdHandle(STD_OUTPUT_HANDLE), pos);
main()
char name [25];
int order;
int quant=0;
int amount=0;
double cash;
Page 1 of 7
double change;
char again;
char another;
int a, x;
int cq=0;
do
cout<<"\t\t\tTAPSI NI VIVIAN'S MENU";
gotoxy(1,2);
for(x=1; x<=6; x++)
cout<<"\n"<<x<<".";
cout<<"\n";
gotoxy(3,3);
cout<<"Tapsilog=P80.00" <<"\t\t\t" <<"7. Beef Mami=P50.00";
gotoxy(0,4);
for(a=0; a<=70; a++)
cout<<"-";
gotoxy(3,5);
cout<<"Tosilog=P80.00" <<"\t\t\t" <<"8. Bottled Softdrinks=P25.00";
gotoxy(0,6);
for(a=0; a<=70; a++)
cout<<"-";
gotoxy(3,7);
cout<<"Longsilog=P95.00" <<"\t\t\t" <<"9. Canned Softdrink=P25.00";
Page 2 of 7
gotoxy(0,8);
for(a=0; a<=70; a++)
cout<<"-";
gotoxy(3,9);
cout<<"Bulalo=P225.00"<<"\t\t\t" <<"10. Minute Maid=P30.00";
gotoxy(0,10);
for(a=0; a<=70; a++)
cout<<"-";
gotoxy(3,11);
cout<<"Sisig with Egg=P140.00"<<"\t\t"<<"11. Nestea=P20.00";
gotoxy(0,12);
for(a=0; a<=70; a++)
cout<<"-";
gotoxy(3,13);
cout<<"Goto=P40.00"<<"\t\t\t\t"<<"12. Bottled watter=P15.00";
gotoxy(0,15);
cout<<"\nCustomer name: ";
gets(name);
do
cout<<"\nHello there "<<name<<", welcome to Tapsi Ni Vivian! What
is your order? ";
cin>>order;
Page 3 of 7
cout<<"How many orders will that be?: ";
cin>>quant;
if (order==1)
amount=amount+80*quant;
else if (order==2)
amount=amount+80*quant;
else if (order==3)
amount=amount+95*quant;
else if (order==4)
amount=amount+225*quant;
else if (order==5)
amount=amount+140*quant;
else if (order==6)
Page 4 of 7
amount=amount+40*quant;
else if (order==7)
amount=amount+50*quant;
cq=quant;
else if (order==8)
amount=amount+25*quant;
cq=quant;
else if (order==9)
amount=amount+25*quant;
cq=quant;
else if (order==10)
amount=amount+30*quant;
cq=quant;
else if (order==11)
amount=amount+20*quant;
cq=quant;
Page 5 of 7
}
else if (order==12)
amount=amount+15*quant;
cq=quant;
else;
cout<<"Want to add an another order? (Y or N): ";
cin>>again;
cout<<"\n";
}while (again=='y'||again=='Y');
cout<<"Customer name: "<<name;
cout<<"\nYour total amount is P"<<amount;
cout<<"\nTotal cash: P";
cin>>cash;
change=cash-amount;
cout<<"Your change will be P"<<change;
cout<<"\n\nThank you for ordering "<<name<<", please come again soon!
:)";
cout<<"\n\nAre there any more customers? (Y or N): ";
cin>>another;
cout<<"\n\n";
Page 6 of 7
if (another=='y'||another=='Y')
system("cls");
else
cout<<"***end of program***";
cin.ignore();
}while(another=='y'||another=='Y');
cout<<"\n\n";
return 0;
Page 7 of 7