I'm creating a basic C program that I want to accept both positive and negative inputs. However, as it is it doesn't accept negative inputs. Any help on how to fix it will be much appreciated. here is the code:
int main(void){
// Here we declare integer and floating point number and assign values to them
int change = 0;
float fchange = 0.00;
// Let's ask the user how much is owed and get his/her input
printf("How much change do I owe you? ");
fchange = GetFloat();
// Let's multiply the Dollar value by 100
change = (int)roundf(fchange*100.0);
// Here we assign values to coin denominations
int quarters = change/25;
change = change % 25;
int dimes = change/10;
change = change % 10;
int nickels = change/5;
change = change % 5;