I forgot to add my code, here it is:
Code:
while (isalpha(s)==0){//beginning of loop to test whether input is a letter, starts as a number.
printf("\n\n\tStore selection menu\n\t---------------------\n\n");//Store Menu Menu
printf("\tD) Del Mar\n");
printf("\tE) Encinitas\n");
printf("\tL) La Jolla\n");
printf("\tQ) Quit\n\n");
printf("\tSelect D, E, L, or Q : ");
scanf("%c", &s);
if( isalpha(s) )
break;
else
printf("\n\tInvalid response, try again");
//this may be of some importance - != is the same as not equal to in C
}//end of loop
d=7.25;
e=7.50;
l=7.75;
//calculations of Sales Tax
x=p*d*0.01;//del mar result
y=p*e*0.01;//encinitas result
z=p*l*0.01;//la jolla
switch (s) {
case 'd': case 'D':
printf("\n\tStore Name : Del Mar");
printf("\n\tTax Rate : %.2f", d);
printf("%%");
printf("\n\tPurchase Amount : %.2f", p);
printf("\n\tTax Amount : %.2f", x);
printf("\n\tTotal Sale Amount : %.2f", p+x);
break;
case 'e': case 'E':
printf("\n\tStore Name : Encinitas");
printf("\n\tTax Rate : %.2f", e);
printf("%%");
printf("\n\tPurchase Amount : %.2f", p);
printf("\n\tTax Amount : %.2f", y);
printf("\n\tTotal Sale Amount : %.2f", p+y);
break;
case 'l': case 'L':
printf("\n\tStore Name : La Jolla");
printf("\n\tTax Rate : %.2f", l);
printf("%%");
printf("\n\tPurchase Amount : %.2f", p);
printf("\n\tTax Amount : %.2f", z);
printf("\n\tTotal Sale Amount : %.2f", p+z);
break;
case 'q': case 'Q':
exit (1);
default:
printf("Invalid Response, Try Again");
}
}