Hi i'm doing a project for college thats an cash register style program that lets you choose ither euro or sterling to make ur transaction in anyways i had no problem writing the program at all but we have to have the program to error check its self and i came across a very weird error that i can't think of a way to fix i'd aperiate any hints on how to fix it thank you
Code:
while ( num != 0 )
{
printf( "Please enter product price: " ) ;
scanf( "%f" , &num ) ;
total += num ;
printf( "The total price so far is %5.2f\n\n\n" , total ) ;
}
total and num are float vars but the error is when i type in a letter it will continuiously add 1 pound on every second how would i stop this from happening like displaying an error message is someone types in an letter? thanks for the help.