I do not know if this has ever been asked in C before but
I have a floating point variable like this:
while (fCost <= 0.0)
{
printf("\n\tKudler Fine Foods 'Sales Tax Calculator'\t\n");
printf("\nPlease enter your sub-total:\n"); //allows customer to enter sub-total
scanf("\n%f", &fCost);
}
note the variable was named as a floating point earlier
When I type in c or m or any other letter and not a number I go into an infinite loop
now the question
How to I get the loop to repeat and not accept a character so I can prevent the infinite loop?