哪位帮我看一下这段代码,为什么输入任何数都会显示 E?
#include<stdio.h>
int main()
{
char grade;
int a, temp;
printf("plese input nub:");
scanf("%d", &a);
if (a < 0 || a>100)
printf("no");
else
{
temp = a/10;
switch(temp)
{
case10:
case9:grade = 'A'; break;
case8:grade = 'B'; break;
case7:grade = 'C'; break;
default:grade='E';
}
printf("%d--->%c\n", a, grade);
}
}