聊发少年狂
#include <stdio.h>
int main ()
{
int score;
printf("input the score:");
scanf("%d",&score);
if(score<0 || score>100){
printf("input score error!\n");
}else{
score /= 10;
switch(score){
case 10:
case 9:
printf("the score is 'A'\n");
break;
case 8:
printf("the score is 'B'\n");
break;
case 7:
printf("the score is 'C'\n");
break;
case 6:
printf("the score is 'D'\n");
break;
default:
printf("the score is 'E'\n");
break;
}
}
return 0;
}