HDU 2004 成绩转换
1 #include<stdio.h> 2 int main() 3 { 4 int r; 5 while(scanf("%d",&r)!=EOF) 6 { 7 if(r<0) 8 puts("Score is error!"); 9 else if(r<60) 10 puts("E"); 11 else if(r<70) 12 puts("D"); 13 else if(r<80) 14 puts("C"); 15 else if(r<90) 16 puts("B"); 17 else if(r<101) 18 puts("A"); 19 else 20 puts("Score is error!"); 21 } 22 return 0; 23 }