Switch Statements and Sentinel-Controlled Looping
807599Nov 9 2006 — edited Nov 9 2006I have to write an app that reads an application for a mail-order house that sells 5 products as follows. Product 1: $2.98, product 2: $4.50, product 3: $9.98, product 4: $4.49 and product 5: $6.87. It should read a series of pairs of numbers as follows a) product number and b) quantity sold.
I need to use a switch statement to determine the retail price for each product. It should calculate and display the total retail value of all products sold. I have to use a sentinel controlled loop to determine when the program should stop looping and display the final results.
I am completely lost with this project. I would be ever so grateful if someone could get me started!