COP 2002 Project 3-1: Change Calculator solved

Original price was: $35.00.Current price is: $30.00.



5/5 - (3 votes)

Create a program that calculates the coins needed to make change for a specified
monetary amount.
Change Calculator
Enter dollar amount (for example, .56, 7.85): 3.37
Quarters: 13
Dimes: 1
Nickels: 0
Pennies: 2
Continue? (y/n): y
Enter dollar amount (for example, .56, 7.85): .55
Quarters: 2
Dimes: 0
Nickels: 1
Pennies: 0
Continue? (y/n): X
please enter y or n
Continue? (y/n): n
• The program should display the minimum number of quarters, dimes, nickels, and pennies that
represent the coins that make up the specified amount.
• Assume that the user will enter a valid number.
• The program should continue only if the user enters “y” or “Y” to continue.
• Save the file with the filename where XXX is either your initials or your last name.