So this is the code I have right now for cash in problem set 1. I don't know whats wrong.
#include <stdio.h>
#include <cs50.h>
#include <math.h>
int maid (void)
{
float c;
int i;
i=0;
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);
}
And this is the error that came up.
PLEASE HELP ME! Thanks :)