Write a C++program to read a series of product names, count, and price of each item in a file called cart.in to the end. Calculate the cost of each item and the total amount spent before taxes. Assuming the sales tax applied is 5.7%, display the total cost of each item and the total amount after taxes. Output the results to a file called receipts.out. The output must be in the form shown below. Attach the code and screenshot of a successful run on the program.
Write a C++program to read a series of product names, count, and price of each item in a file called cart.in to the end. Calculate the cost of each item and the total amount spent before taxes. Assuming the sales tax applied is 5.7%, display the total cost of each item and the total amount after taxes. Output the results to a file called receipts.out. The output must be in the form shown below. Attach the code and screenshot of a successful run on the program.
==== Your receipt
Item Count Price/Item Item Total
Pens 3 $ 2.99 $ 8.97
Notebook 5 $ 3.00 $15.00
Shoes 1 $ 25.19 $ 25.19
===================== Subtotal $ 49.16
===================== Total $ 51.96
Trending now
This is a popular solution!
Step by step
Solved in 3 steps with 2 images