Question: in C++ Write a program that reads the amount of coins collected at the end of each day of a month in the CS1 Supermarket

in C++
Write a program that reads the amount of coins collected at the end of each day of a month in the CS1 Supermarket and calculates the total amount in dollars. The program reads the data for the entire month from the file coinsCoins.txt (assume the month has 30 days). The file coinsCoins.txt has one line for each day where each line has: number of pennies, space, number of Nickels, space, number of Dimes, space, number of Quarters. Make sure that the total amount is displayed with exactly two decimals. 1 Nickle = 5 pennies, 1 Dime = 10 pennies, 1 Quarter = 25 pennies, and 1 Dollar = 100 pennies. For the sake of testing your program consider a coinsCoins.txt file where the first 28 lines, each contains 0 0 0 0 and the last two lines are 0 117 430 705 and 0 320 414 833. The file is for a month where no coins where collected in the first 28 days
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
