Flowchart

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 6

Our Flowchart

START

set1, set2, set3,

set1_price, set2_price, set3_price,

setNum, amount;

food.set1 = “Light In The East!”;

food.set2 = “Get Chicky!”;

food.set3 = “Waffles Over Buns!”;

food.set1_price = 30 ;

food.set2_price = 36;

food.set3_price = 35;

int i = 0;

int displayNum[3] = {1, 2, 3};

int *ptr[3];

" WELCOME TO OUR RESTAURANT~\n\n"

"_____________________ MENU _____________________\n\n";

ptr[i] = &displayNum[0];
" ( "<< *ptr[i]<< " ) RM "<< food.set1_price<< " / "<< food.set1<< " ..includes:\n\n"

" - Summer rolls\n - Seared scallops with black sesame rice\n - Red bean buns\n\n";

ptr[i] = &displayNum[1];

" ( "<< *ptr[i]<< " ) RM "<< food.set2_price<< " / "<< food.set2<< " ..includes:\n\n"

" - Pesto chicken kebabs\n - Chicken lasagna\n - Lemon grass sorbet with mango\n\n";

ptr[i] = &displayNum[2];

" ( "<< *ptr[i]<< " ) RM "<< food.set3_price<< " / "<< food.set3<< " ..includes:\n\n"

" - Greek salad\n - Chicken waffles\n - Waffles ice cream\n";

"__________________________________________________\n\n"

"TYPE THE NUMBER on the left to choose ONE set.\n";

chooseAgain;

"\n\n\n----------------------------------------\n\n"
" Select the set of your choice = ";

food.setNum;

"\n----------------------------------------\n\n";

YES

food.setNum == 1 food.set1;

NO YES

food.setNum == 2 food.set2;

NO

NO YES

food.setNum == 3 food.set3;

NO

"Please choose something that is on the menu.\n"

"\n\n\n--------------------------------------<<\n\n"

" Please choose again = ";

food.setNum;
"\n--------------------------------------<<\n\n";

"Type Y to CONFIRM or N to UNDO = ";

chooseAgain;

YES while (chooseAgain=='n' ||

chooseAgain=='N');

NO

"\n\n\n----------------------------------------\n\n";

" How many order(s)? = ";

food.amount;

"\n----------------------------------------\n\n";
food.amount<< " order(s). Are you sure?\n\n"

"Type Y to CONFIRM or N to UNDO = ";

chooseAgain;

while (chooseAgain=='n'

|| chooseAgain=='N');

YES

NO

YES

food.setNum == 1 "\n\n\n______________ CHECKOUT ______________\n\n"

" "<< food.amount<< " set(s) - "<< food.set1<< "\n\n"

" Total price is RM "<< food.set1_price * food.amount

NO "\n________________________________________\n\n";

YES

food.setNum == 2 "\n\n\n______________ CHECKOUT ______________\n\n"

" "<< food.amount<< " set(s) - "<< food.set2<< "\n\n"

" Total price is RM "<< food.set2_price * food.amount

NO "\n________________________________________\n\n";
YES

food.setNum == 3 "\n\n\n______________ CHECKOUT ______________\n\n"

" "<< food.amount<< " set(s) - "<< food.set3<< "\n\n"

" Total price is RM "<< food.set3_price * food.amount

"\n________________________________________\n\n";

END

You might also like