Professional Documents
Culture Documents
by Samantha R. Sacdal
1 1 of 9
Screenshots
Before my program starts you will see different meals and flavors that you will
have to choose from 1 to 7 also different flavors from 1 to 5, type any number in 1-
7 in the question “What is your order?” to proceed.
Then in “what is your order? :” i input 3 after that there will be a following
question how many order you want i input 2 to then the program will proceed.
1 2 of 9
After I input the order and quantity there will be another question for the flavor,
what number of flavors I want from 1 to 5 then I input 2 for cheese after that the
program will proceed.
After all the questions for the order the program will proceed to the bill. The user
order number 2 which is D3/ 1 Jolly hotdog with Regular Fries that cost 79 pesos
with the quantity of 2 so that the bill shows 158 pesos and the amount that the user
input is 200 pesos.
1 3 of 9
After entering the amount, the program will show the meals that the user ordered
like what you see above also it shows the money of user and it will compute
automatically the user change like in this example the amount is 200 and the user
change is 42 pesos.
1 4 of 9
SOURCE CODE
#include <iostream>
#include <cstdlib>
int viewordermenu()
string menu[7][7];
menu[1][0] = " 3. D3/1 Jolly Hotdog with Regular Fries w/ Drinks = 79";
menu[1][1] = " 4. C4/8pc. Chickenjoy Bucket (With 4 Rice and 4 Drinks) = 600";
cout<<menu[0][0]<<endl;
cout<<menu[0][1]<<endl;
cout<<menu[1][0]<<endl;
cout<<menu[1][1]<<endl;
cout<<menu[1][2]<<endl;
cout<<menu[2][2]<<endl;
cout<<menu[2][3]<<endl;
cout<<"FLAVORS"<<endl<<endl<<"1.Plain"<<endl<<"2.Cheese"<<endl<<"3.Barbeque"<<endl<<"4
.Sour Cream"<<endl<<"5.Cheesy Butter"<<endl;
1 5 of 9
}
int total;
total = s - i;
return total;
int main()
int g;
int flav;
int flavor[10];
string orders;
string flavors;
viewordermenu();
a:
cin>>order;
if(order==1)
price = 89;
else if(order==2)
price = 108;
1 6 of 9
}
else if(order==3)
price = 79;
else if(order==4)
price = 600;
else if(order==5)
orders="K5/Sundae";
price = 30;
else if(order==6)
price = 40;
else if(order==7)
goto b;
else
goto a;
cin>>many;
for(flav=1;flav<many;flav+=2)
1 7 of 9
{
c:
cin>>flavor[flav];
if(flavor[flav]==1);
flavors="Plain";
if(flavor[flav]==2)
flavors="Cheese";
else if(flavor[flav]==3)
flavors="Barbeque";
else if(flavor[flav]==4)
flavors="Sour Cream";
else if(flavor[flav]==4)
flavors="Cheesy Butter";
else
goto c;
d:
1 8 of 9
cout<<"Enter Amount: ";
cin>>money;
if(money<pri)
cout<<"Sorry your money is not enough, kindly enter bigger amount than your
bill"<<endl;
goto d;
else{
goto e;
e:
cout<<orders<<" "<<flavor[g]<<endl;
b:
return EXIT_SUCCESS;
1 9 of 9