You are on page 1of 9

JOLLYJOLLY MEAL MENU

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>

using namespace std;

int viewordermenu()

cout<<" WELCOME TO JOLLYJOLLY "<<endl<<endl;

cout<<" WHAT'S YOUR YOUR ORDER MA'AM/SIR? "<<endl<<endl;

cout<<" JOLLYJOLLY MEAL "<<endl;

string menu[7][7];

menu[0][0] = " 1. C1/1pc. Chickenjoy w/ Drinks = 89";

menu[0][1] = " 2. C2/1pc. Chickenjoy and Jolly Spaghetti w/ Drinks = 108";

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";

menu[1][2] = " 5. K5/Sundae w/ Regular Fries = 65";

menu[2][2] = " 6. D6/Yum Cheese Burger = 40";

menu[2][3] = " 7. I don't want to order!";

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 change( int s, int i)

int total;

total = s - i;

return total;

int main()

int g;

int flav;

int order, many, pri;

int flavor[10];

int price = 0,money, change;

string orders;

string flavors;

viewordermenu();

a:

cout<<endl<<"What is your order?: ";

cin>>order;

if(order==1)

orders="C1/1pc. Chickenjoy w/ Drinks";

price = 89;

else if(order==2)

orders="C2/1pc. Chickenjoy and Jolly Spaghetti w/ Drinks";

price = 108;

1 6 of 9
}

else if(order==3)

orders="D3/1 Jolly Hotdog with Regular Fries w/ Drinks";

price = 79;

else if(order==4)

orders="C4/8pc. Chickenjoy Bucket (With 4 Rice and 4 Drinks)";

price = 600;

else if(order==5)

orders="K5/Sundae";

price = 30;

else if(order==6)

orders="D6/Yum Cheese Burger";

price = 40;

else if(order==7)

goto b;

else

cout<<"That is out of order"<<endl;

goto a;

cout<<"How many?: ";

cin>>many;

pri = price * many;

for(flav=1;flav<many;flav+=2)

1 7 of 9
{

c:

cout<<"What number the Flavors?: ";

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

cout<<"What is it Again?: "<<endl;

goto c;

cout<<"This is your BILL ma'am/sir"<<endl<<pri<<endl;

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:

change = (money - pri);

cout<<"Your order is "<<endl;

for(g = 0;g <= flav;g++)

cout<<orders<<" "<<flavor[g]<<endl;

cout<<"Your Money is "<<money<<endl<<"Your change is "<<change<<endl;

b:

cout<<endl<<"THANK YOU!, PLEASE COME AGAIN!!";

return EXIT_SUCCESS;

1 9 of 9

You might also like