Convert the total number of pennies ('totalpennies') to quarters, nickels, and pennies, finding the maximum number of quarters, then nickels, then pennies. For instance, if the input is 181, what would be the corresponding output?

a) Quarters: 7, Nickels: 1, Pennies: 1
b) Quarters: 4, Nickels: 1, Pennies: 31
c) Quarters: 1, Nickels: 1, Pennies: 6
d) Quarters: 2, Nickels: 0, Pennies: 1

Q&A Education