#include<stdio.h> #include<string.h> #include<stdlib.h> int main() { int t; while(scanf("%d",&t)!=EOF) { if(t<0||t>100)//刚开始这里错了,放到switch里面去了,后面看了题目条件是小于0和大于100的才输出下面的内容,看来做题不能想当然了。 printf("Score is error!\n"); else { switch(t/10) { case 10: case 9: printf("A\n");break; case 8: printf("B\n");break; case 7: printf("C\n");break; case 6: printf("D\n");break; case 5: case 4: case 3: case 2: case 1: case 0: printf("E\n");break; } } } // system("pause"); return 0; }