标签:
1 #include<stdio.h> 2 #include<math.h> 3 int main() 4 { 5 int a,num; 6 while(scanf("%d",&a)!=EOF) 7 { 8 num=a/10; 9 if(a<0||a>100) 10 num=(-1); 11 12 switch(num) 13 { 14 case 10: 15 case 9:printf("A\n");break; 16 case 8:printf("B\n");break; 17 case 7:printf("C\n");break; 18 case 6:printf("D\n");break; 19 case 5: 20 case 4: 21 case 3: 22 case 2: 23 case 1: 24 case 0:printf("E\n");break; 25 case -1:printf("Score is error!\n");break; 26 default:break; 27 } 28 } 29 }
标签:
原文地址:http://www.cnblogs.com/wangmengmeng/p/4547635.html