Программа должна разбивать дробь(float), на монетки 0,1 - 0,25.Число 4,84 например делит нормально, а вот у числа 3,81 оставляет осадок в виде 0.01.
#include <stdio.h>
#include <cs50.h>
int main (void) {
int used_coins = 0;
float coin;
float money = get_float("how many?:");
float coins[4] = {0.25, 0.10, 0.05, 0.01};
for (int i = 0; i < 4;) {
coin = coins[i];
while (money - coin >= 0.000000) {
used_coins++;
money = money - coin;
}
printf("used\n");
printf("%d\n", used_coins);
printf("%f\n", coin);
used_coins = 0;
if (money == 0) {
break;
}
i++;
}
printf("%f", money);
}

