Question: Problem 2 Total cost A store sells five different items whose retail prices are shown in the following table: Item code Retail price 2.98 4.50
Problem 2 Total cost A store sells five different items whose retail prices are shown in the following table: Item code Retail price 2.98 4.50 9.98 4.49 6.87 Write a C++ program that reads a series of pairs of numbers of (item code and quantity sold). Your program should calculate and display the total retail value of all items sold. Use -1 as a sentinel value. Sample input/output: nter the iten code&Quantity: 2 nter the iten code&Quantity: 9 12 The value of code is out of range nter the iten code &Quantity: 3 8 nter the iten code &Quantity: 1 5 nter the iten code&Quantity: -1 otal cost, is 126.24
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
