Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions