#include
int main()
{
int s;
printf("请输入一个成绩:");
scanf("%d",&s);
if(s>100 || s < 0)
{
printf("输入了一个错误的成绩.n");
return 1;
}
char ch;
switch(s/10)
{
case 10:
case 9:ch = 'A'; break;
case 8:ch = 'B'; break;
case 7:ch = 'C'; break;
case 6:ch = 'D'; break;
default:
ch = 'E'; break;
}
printf("您输入的成绩等级为:%cn",ch);
return 0;
}