Skip to main content
3 of 5
that sad face is just too sad?
Air
  • 2.1k
  • 18
  • 29

Getting a inifinite do while loop while using printf() and round()

This is part of code from my greedy.c

The purpose of this do while loop is to get a valid input.

I'm having trouble, I tested it outside do while loop and it was working fine.

I think that mistake is really dumb but I really need help!!

I'm stuck here... :-(

int change;

do
{
    printf("How much I owe you: ");
    change = round(GetFloat() * 100);
} 
while (change < 0);