hello guys I got en error from check50 2022 which you can see it in my screenshot I check it 100 times but I can't resolve the problem can you please help me?
#include <cs50.h> #include <stdio.h> #include <math.h>
int main(void) { float dollar; do { dollar = get_float("Enter your change: "); //ask user to input positive float number } while ( dollar<= 0); //imput must longer then 0 int cents = round(dollar * 100); //dollars to cents int coins = 0; //count coins while (cents >= 25) //Quarters 25 cents { cents -=25; coins++; } while (cents >= 10) //dimes 10 cents { cents -=10; coins++;
}
while ( cents >= 5) //nickels 5 cents
{
cents -= 5;
coins++;
}
while ( cents >= 1) //pennies 1 cent
{
cents -=1;
coins++;
}
printf("You will need at least %icoins\n",coins); //total nimber largest coins returned
}