Product number Retail price $ 2.98 $ 4.50 $ 9.98 $ 4.49 $6,87 1 2 3 4 5 Write a program that reads a series of pairs of numbers as follows: a) Product number b) Quantity sold for one day Your program...

C program
Product number<br>Retail price<br>$ 2.98<br>$ 4.50<br>$ 9.98<br>$ 4.49<br>$6,87<br>1<br>2<br>3<br>4<br>5<br>Write a program that reads a series of pairs of numbers as follows:<br>a) Product number<br>b) Quantity sold for one day<br>Your program should use a switch statement to help determine the retail price for each product.<br>Your program should calculate and display the total retail value of all products sold last week.<br>Entering -1 for product number should indicate you are done entering the product numbers.<br>Sample input and output<br>Please enter the product number between 1 and 5. -1 to end :1<br>Please enter quantity sold: 2<br>Please enter the product number between 1 and 5. -1 to end :2<br>Please enter quantity sold: 3<br>Please enter the product number between 1 and 5. -1 to end :3<br>Please enter quantity sold: 4<br>Please enter the product number between 1 and 5. -1 to end :4<br>Please enter quantity sold: 5<br>Please enter the product number between 1 and 5. -1 to end :5<br>Please enter quantity sold: 6<br>Please enter the product number between 1 and 5. -1 to end :1<br>Please enter quantity sold: 3<br>Please enter the product number between 1 and 5. -1 to end :2<br>Please enter quantity sold: 4<br>Please enter the product number between 1 and 5. -1 to end :3<br>Please enter quantity sold: 5<br>Please enter the product number between 1 and 5. -1 to end :4<br>Please enter quantity sold: 6<br>Please enter the product number between 1 and 5. -1 to end :5<br>Please enter quantity sold: 7<br>Please enter the product number between 1 and 5. -1 to end :-1<br>Product Qty Sales<br>Product 1: 5 14.90<br>Product 2: 7 31.50<br>Product 3: 9 89.82<br>Product 4: 11 49.39<br>Product 5: 13 89.31<br>Total<br>: 274.92<br>

Extracted text: Product number Retail price $ 2.98 $ 4.50 $ 9.98 $ 4.49 $6,87 1 2 3 4 5 Write a program that reads a series of pairs of numbers as follows: a) Product number b) Quantity sold for one day Your program should use a switch statement to help determine the retail price for each product. Your program should calculate and display the total retail value of all products sold last week. Entering -1 for product number should indicate you are done entering the product numbers. Sample input and output Please enter the product number between 1 and 5. -1 to end :1 Please enter quantity sold: 2 Please enter the product number between 1 and 5. -1 to end :2 Please enter quantity sold: 3 Please enter the product number between 1 and 5. -1 to end :3 Please enter quantity sold: 4 Please enter the product number between 1 and 5. -1 to end :4 Please enter quantity sold: 5 Please enter the product number between 1 and 5. -1 to end :5 Please enter quantity sold: 6 Please enter the product number between 1 and 5. -1 to end :1 Please enter quantity sold: 3 Please enter the product number between 1 and 5. -1 to end :2 Please enter quantity sold: 4 Please enter the product number between 1 and 5. -1 to end :3 Please enter quantity sold: 5 Please enter the product number between 1 and 5. -1 to end :4 Please enter quantity sold: 6 Please enter the product number between 1 and 5. -1 to end :5 Please enter quantity sold: 7 Please enter the product number between 1 and 5. -1 to end :-1 Product Qty Sales Product 1: 5 14.90 Product 2: 7 31.50 Product 3: 9 89.82 Product 4: 11 49.39 Product 5: 13 89.31 Total : 274.92
Jun 04, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions ยป

Submit New Assignment

Copy and Paste Your Assignment Here