#include<stdio.h> int main() {int t; while(scanf("%d",&t)!=EOF) {while(1) { if(t>100 || t<0) {printf("Score is error!\n"); break; } else if(t>=90) {printf("A\n"); break; } else if(t>=80) {printf("B\n"); break; } else if(t>=70) {printf("C\n"); break; } else if(t>=60) {printf("D\n"); break; } else {printf("E\n"); break; } } } return 0; }
原文:http://www.cnblogs.com/woderenshengluwozijizou/p/4442773.html