思路及代码
//input 多组 s int 0<= <=100
//-1 end
#include<iostream>
using namespace std;
int main(){
int s;
while (cin >> s){
if (s == -1){
break;
}
//solution
//90-100
//80-89
//60-79
//else
if(90 <= s && s <= 100){
cout << "A" << endl;
}else if (80 <= s){
cout << "B" << endl;
}else if (60 <= s){
cout << "C" << endl;
}else{
cout << "D" << endl;
}
}
return 0;
}
参考:无
收获:无
菜菜,不是教程,做题和学习记录