Question 1133178
<br>
Since you want the largest amount you can have without being able to make change for a dollar, use a "greedy algorithm" for solving the problem: take the largest number of quarters you can have without being able to make change for a dollar; add the largest number of dimes you can, still not being able to make change for a dollar, then do the same with nickels, and then with pennies.<br>
-----------------------------------------------------------------<br>
Added after seeing response from reader....<br>
-----------------------------------------------------------------<br>
3 quarters is the most you can have; with 4 of course you could make change for a dollar.<br>
But you can have more than 2 dimes....<br>
And then at the end the last thing you will add is 4 pennies.