#include<stdio.h>
int main()
{
int grade;
char result;
scanf("%d",&grade);
if(grade<0||grade>100)
printf("该数据无法进行判断,请重新输入\n");
switch(grade/10)
{
case 10:
case 9: result='A'; break;
case 8: result='B'; break;
case 7: result='C'; break;
case 6: result='D'; break;
default: result='E';
}
printf("%c\n",result);
return 0;
}
运行结果如下: