A Market has four different items whose prices are: item 1 — $2.98, item 2—$4.50, item 3—$9.98, item 4—$4.49
Write a program that reads a series of pairs of numbers such as ( a) product number b) quantity sold.)
Your program should use a switch structure to calculate the price for each product.
Your program should display your first name when user selects item 1 , or display your last name when user selects item 2, and display your middle name when user selects item 3, and nothing to display with item4.
Your program should calculate and display the total value of all products sold.
Your program should display the total number of each product category sold.
You do not know the number of items in advance, use a sentinel-controlled loop to determine when the program should stop looping and display the final results.
Comments
Leave a comment