Question: Write a C + + program that prompts the user to enter some number of pennies cent coins ) , dimes ( 1 0 -

Write a C++ program that prompts the user to enter some number of pennies cent coins), dimes (10-cent coins), quarters (25- cent coins), half dollars (50-cent coins), and one-dollar coins (100-cent coins). Query the user separately for the number of each size coin, e.g., "How many pennies do you have?" Then your program should print out something like this:
You have 23 pennies.
You have 17 nickels.
You have 14 dimes.
You have 7 quarters.
You have 3 half dollars.
The value of all your coins is 573 cents or $5.73.
Also, report the sum in dollars and cents, i.e., $5.73 instead of 573 cents.
If there are no coins of a certain type, do not print anything for that type.
 Write a C++ program that prompts the user to enter some

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!