sorry, my eng is not good that much
I am trying to run this program I am getting a strange result when I press 'a' through keyboard switch is running twice automatically for first time it is going to perfect case then second time it's going to default case
main()
{
int grade;
int acount =0;
int bcount =0;
while((grade=getchar())!=EOF)
{
switch(grade)
{
case 'a': ++acount; break;
case 'b': ++bcount; break;
default: printf("you enter wrong choice");
}
}
return 0;
}