Write a program that asks the user to enter an amount of money in the format of dollars and remaining cents. The program should calculate and print the minimum number of coins (quarters, dimes, nickels and pennies) that are equivalent to the given amount. Hint: In order to find the minimum number of coins, first find the maximum number of quarters that fit in the given amount of money, then find the maximum number of dimes that fit in the remaining amount, and so on. Note: I asked the similar question twice, but none of them could satisfy me nor my grader/instructor/tutor. Please do it in the most formal way. Or else I have to leave Bertbley. Thank you very much.
Write a
Hint: In order to find the minimum number of coins, first find the maximum number of quarters that fit in the given amount of money, then find the maximum number of dimes that fit in the remaining amount, and so on.
Note: I asked the similar question twice, but none of them could satisfy me nor my grader/instructor/tutor. Please do it in the most formal way. Or else I have to leave Bertbley. Thank you very much.
Trending now
This is a popular solution!
Step by step
Solved in 2 steps with 1 images