http://acm.hdu.edu.cn/showproblem.php?pid=2004
#include <bits/stdc++.h> using namespace std; int main() { int n; while(~scanf("%d",&n)) { if(n>100||n<0) printf("Score is error!\n"); else { if(n>=90&&n<=100) printf("A\n"); else if(n>=80&&n<=89) printf("B\n"); else if(n>=70&&n<=79) printf("C\n"); else if(n>=60&&n<=69) printf("D\n"); else printf("E\n"); } } return 0; }
原文:https://www.cnblogs.com/zlrrrr/p/9321146.html