Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Write a C program that implements a menu ordering system at a restaurant. There should be 3 items: Salad, which costs $2.50 Pizza, which costs
Write a C program that implements a menu ordering system at a restaurant. There should be 3 items: Salad, which costs $2.50 Pizza, which costs $5.60 Linguini, which costs $4.80 Ask the user how many orders they would like to make. For each order, ask them what item and how many they would like. When asking for user input, use 0 to represent salad, 1 to represent pizza, and 2 to represent linguini. Keep track of the total cost of the orders. At the end, if the total cost is over $20, add a 15% tax to the order. If a tax is added, print out the subtotal (before tax) and the tax amounts. (See the sample output below). At the end of the program, print out the grand total. Sample Output 1: Welcome to the very limited restaurant menu. * Salad: $2.50 * Pizza: $5.60 * Linguini: $4.80 How many orders would you like to make? 3 Which item would you like to order? O How many of this item would you like to order? 1 Which item would you like to order? 1 How many of this item would you like to order? 1 Which item would you like to order? 2 How many of this item would you like to order? 1 Your grand total is $12.90 Sample Output 2: Welcome to the very limited restaurant menu. * Salad: $2.50 * Pizza: $5.60 * Linguini: $4.80 How many orders would you like to make? 4 Which item would you like to order? 0 How many of this item would you like to order? 3 Which item would you like to order? 1 How many of this item would you like to order? 3 Which item would you like to order? 2 How many of this item would you like to order? 4 Which item would you like to order? O How many of this item would you like to order? 5 Your subtotal is $56.00 Your tax is $8.40 Your grand total is $64.40
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started