Question: Create a C program that will: Display a menu of 5 to 10 differently priced items for sale to the user Input the number of

Create a C program that will:

Display a menu of 5 to 10 differently priced items for sale to the user

Input the number of the menu item they selected

Use switch-case to determine the cost of the item number they selected. You should have a case for every item and use the else for unexpected values

Tell the user that there is a buy one, get one off sale where the less expensive item is off

Allow the user to select a 2nd item

Use if-else to determine which is the less expensive item to discount to of the original price

Declare and use appropriate identifiers needed to accomplish your code objectives

Use the code from the previous labs for the welcome screen and to calculate Indiana sales tax

At the end of the program, display the discount amount, subtotal, sales tax and total cost

Create a C program that will:

Your store is offering a new sale: Buy 2 items get the 3rd one free no matter the cost! So, users can opt to choose a 3rd item and get that one free or just buy two and get off the cheaper one. Your program should determine if they bought two or three items and apply the appropriate discount. Add any needed identifiers and if-else structures to accomplish this.

Meet all of the other functional, input, and output requirements of the Chapter 4 Lab assignment (use your Chapter 4 lab. If you couldnt get it to work, please schedule an in-person or zoom meeting with me to work through it)

Include a sentinel-controlled while loop that will continue to prompt them for a correct menu choice if they enter an invalid selection. Use a sentinel identifier and control the while loop with the sentinel and update it within the loop based on their selection being valid or not.

Include a counter-controlled do-while loop around your code that displays the menu, prompts for selections and assigns your item costs and re-prompts them for the additional items instead of repeating your code.

At the end of the program, display the discount amount, subtotal, sales tax and total cost

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!