So I'm having issues with this producing the right answer for a some money values like .53. It gives me 4 coins when it should be 5.
#include <stdio.h>
#include <cs50.h>
int main(void)
{
int counter = 0;
float money;
do
{
printf("Enter the value of your money:");
money = (int) (100* get_float());
}
while (money < 0);
while (money >= 25)
{
money = (money - 25);
counter++;
}
while (money >= 10)
{
money = (money - 10);
counter++;
}
while (money >= 5)
{
money = (money - 5);
counter++;
}
while (money >= 1)
{
money = (money - 1);
counter++;
}
printf("%i\n", counter);
}