Question: i want the coding. Exercise 2: Amount Due (Use switch) Otrite a program that reads the code of the quantity of an item in a
Exercise 2: Amount Due (Use switch) Otrite a program that reads the code of 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 4 5 price 6.49 10.50 9.99 15.00 21.50 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
Get step-by-step solutions from verified subject matter experts
