Question: Exercise 2: Amount Due (Use switch) Write a program that reads the code and the quantity of an item in a supermarket. According to the

 Exercise 2: Amount Due (Use switch) Write a program that reads

Exercise 2: Amount Due (Use switch) Write a program that reads the code and the quantity of an item in a supermarket. According to the (code-price) table below, the program calculates and prints the amount due for that quantity. code 1 2 3 price 6.49 10.50 9.99 15.00 21.50 4 5 Sample input/output: Enter the code and quantity of the item you want to buy: 4 2 The amount due is: 30 Enter the code and quantity of the item you want to buy: 3 3 The amount due is: 29.97

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!