I programmed greedy.c and when I try to compie it there is one error coming up and I have no clue how to fix it. Thats my code:
include
include
include
int main(void) { float dollars; int amount int count = 0;
do
{
printf ("how much change is owed?: \n");
dollars = GetFloat ();
}
while (dollars <= 0);
amount = round(dollars*100);
while ( amount >= 25)
{ count ++;
amount -= 25;
}
while ( amount >=10)
{ count++;
amount-= 10;
}
while (amount >= 5)
{ count++;
amount-=5;
}
while ( amount >= 1)
{ count++;
amount -= 1;
}
printf ("%d\n, count");
return 0;
} And error is: greedy.c:40:15: error: more '%' conversions than data arguments [-Werror,-Wformat] printf ("%d\n, count") Does anyone have an idea? Thank you!