I wrote the greedy program for the pset1 but in the check50 i'm getting fails in check50 but when i put the same numbers as check50 by myself the coins output is correct as you can see in the image below.enter image description here


4.2 should be 18. You are returning 23, which is the incorrect value.

4.2 is 16 quarters + 2 dimes.

I suspect you aren't rounding your user entry.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .