so this is my code for greedy. When I run it, the amount of necessary coins is slightly imprecise ( when I modify it to a float value, I see just a clean 3.00000 * 10 for example with a roundf for change). For example, when I input 0.41 it shows 3 or 5 to 22 coins or 10 to 42 coins, never actually getting the precise amount of coins needed even if the aforementioned modification not in this topic shows a clean floating value.
Please help !
Removed code, problem solved.