I don't know what I'm doing wrong I get no errors. I feel like my code
#include <cs50.h> #include <math.h> #include <stdio.h>
int main(void) { float x;
float a = 25;
float b = 10;
float c = 5;
float d = 1;
int coins = 0;
do
{
//prompt the user
x = get_float("%s", "change owed? ");
}
while (x < 0);
int y = round(x * 100);
while (a <= y ){
return(y - b);
coins++;
}
while (b <= y ){
return(y - c);
coins++;
}
while (c <= y ){
return(y - c);
coins++;
}
while (d <= y ){
return(y - d);
coins++;
}
printf("The number of coins is %i\n", coins);
}