#include <stdio.h>
int main()
{
int score=87 ;
switch(score)
{
case 90:
printf("等级A");
break;
case 80:
printf("等级B");
break;
case 70:
printf("等级C");
break;
case 60:
printf("等级D");
break;
default:
printf("等级E");
break;
}
return 0;
}
#include <stdio.h>
int main()
{
int score=87 ;
score/=10;
switch(score)
{
case 9:
printf("等级A");
break;
case 8:
printf("等级B");
break;
case 7:
printf("等级C");
break;
case 6:
printf("等级D");
break;
default:
printf("等级E");
break;
}
return 0;
}