So this is the code I have now:
#include <stdio.h>
#include <cs50.h>
#include <math.h>
int main (void)
{
float c;
int i;
do
{
c = get_float("Change: ");
}
while (c < 0);
//Round for each type of coin
c *= 100;
i = round(c);
//quarters
while (i >= 25)
{
i++;
i -= 25;
}
//dimes
while (i >= 10)
{
i++;
i -=25;
}
//nickels
while (i >=5)
{
i++;
i -= 25;
}
//Penny
while (i >=1)
{
i++;
i -= 25;
}
//print coins
printf("%i\n", i);
}
What do I do?? Please help!