Sorry for correcting you, but fflush(stdin) can invoke
undefined behaviour you can use while (getchar() != '\n'); instead. void main can also produce
undefined behaviour so use int main() and put return 0; at the end of your program
About your program, this might help you a bit
Code:
#include <stdio.h>
#include <conio.h>
#include <ctype.h>
int main() //allways use int main()
{
float Purchase, TaxRate;
char County;
clrscr();
printf("Amount of purchase? ");
scanf("%f", &Purchase);
while (getchar() != '\n'); //clear the inputbuffer
printf("County? ");
scanf("%c", &County);
County=toupper(County); //store the upper case value ov County in County for later use
if ( County == 'A')
{TaxRate = Purchase * 0.07;}
else
if((County >='B') && (County <='Z'))
{TaxRate = Purchase * 0.06;}
else
if (isdigit(County))
{printf("Invalid Character!");}
printf("Total Bill: %.2f", TaxRate);
getch();
return 0; //return a value to the OS
}