I faced a problem when executing greedy.c. I think every thing is correct (or probably not), but every time I put $4.2 as the input the program outputs 22 coins, which should be 18 ( 16 x 25c + 2 x 10c). S o a total of 18 coins.
After digging around I found that when I input 4.2, the round command rounds that number to 4.19 (16x25c + 1x10c + 1x5c + 4x1c). So I get the number of coins required as 22 coins.
While all inputs work fine both prerounded numbers and numbers that need rounding. But I only face this 4.2. I check50 only 4.2 created a problem.