多次判断,注意条件限制和格式输出
#include<stdio.h> int main() { int x; while(scanf("%d",&x)!=EOF) { if(x>100)
printf("Score is error! "); else if
(x>=90)printf("A "); else if
(x>=80)printf("B "); else if
(x>=70)printf("C "); else if
(x>=60)printf("D "); else if
(x>=0)printf("E "); else
printf("Score is error! "); } return 0; }