Question: Please write a C++ program that calculates the total amount of given US coins. The user will enter the number of pennies, dimes, and quarters
Please write a C++ program that calculates the total amount of given US coins. The user will enter the number of pennies, dimes, and quarters (only 3 types of coins) to the program, and the program will calculate the total amount in cents and dollars. Finally, the program will print the results for total cents and total dollars. For example: If there are 5 pennies, 6 dimes, and 9 quarters, then the total number of cents and dollars will be 9*25 + 6 * 10 + 5 * 1 = 290 cents 290 / 100 = 2.9 dollars
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
