Write a program that prompts the user to enter an amount of

Write a program that prompts the user to enter an amount of change (between 0 and 99) and prints out how many coins of each denomination are needed to make that change. The program should always try to make change using the higest denomination coin possible. ex. 25 shoud be 1 quarter rather than 2 dimes and 1 nickel.

Solution

Please find the required program along with its output. Please see the comments against each line to understand the step.

---------------------------------------------------------------------------

OUTPUT:

enter an amount of change (between 0 and 99) :
88
Highest coin denomination :
3 quarters 1 dime 3 pennies

Write a program that prompts the user to enter an amount of change (between 0 and 99) and prints out how many coins of each denomination are needed to make that

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site