#include<stdio.h>
void main()
{
float score;
int n;
printf("请输入一个学生的分数\n");
scanf("%f",&score);
n=(int)score;
switch(n/10)
{case 0:
case 1:
case 2:
case 3:
case 4:
case 5:printf("E 等级\n");break;
case 6:printf("D 等级\n");break;
case 7:printf("C 等级\n");break;
case 8:printf("B 等级\n");break;
case 9:
case 10:printf("A 等级\n");break;
default:printf("您输入的数据有误,请重新输入\n");
}
}
温馨提示:答案为网友推荐,仅供参考