It looks like you're new here. If you want to get involved, click one of these buttons!
rite a program that simulates a simple food ordering system. The program should start with displaying a menu
with the following options:
(1) Place Order
If the user chooses Place Order option, the program should display a sub-menu to choose either to order drinks or
food. The sub-menu may look like follows:
(3) Back to Main Menu
Each option (Drinks or Food) should display several options of food/drinks together with their prices. The
following shown an example food menu. You may list your own food and prices in your program.
(1) Nasi Lemak RM5.00
(2) Roti Canai RM1.50
(3) Fried Noodle RM3.50
(4) Back to Order Menu
The user should be allowed to order as many food/drink as he/she wants. For each order, the user need to enter
the quantity needed. If the user chooses Payment option, the program should display the total price need to be
paid. Then prompt the user whether there is a discount given. If there is a discount, read the discount rate in
percentage (e.g. enter 5 for 5% discount) and deduct the discount amount from the total price. Continue to read an
amount paid by the user, and display the balance need to be paid back to the user. After the payment is done, allow
user to go back to the main menu so that another order can be made.
Remember to re-initialize all variables after payment is done before a new order is made.