资源限制 内存限制:512.0MB C/C++时间限制:1.0s Java时间限制:3.0s Python时间限制:5.0s 输入一个百分制的成绩t后,按下式输出它的等级。等级为:90100为A,8089为B,7079为C,6069为D,0~59为E。 样例输入 98 样例输出 A
提交代码:
#include <iostream>
using namespace std;
int main() {
int n;
cin>>n;
if(n>=90)
cout<<"A"<<endl;
else if(n>=80)
cout<<"B"<<endl;
else if(n>=70)
cout<<"C"<<endl;
else if(n>=60)
cout<<"D"<<endl;
else
cout<<"E"<<endl;
return 0;
}
扫码关注腾讯云开发者
领取腾讯云代金券
Copyright © 2013 - 2025 Tencent Cloud. All Rights Reserved. 腾讯云 版权所有
深圳市腾讯计算机系统有限公司 ICP备案/许可证号:粤B2-20090059 深公网安备号 44030502008569
腾讯云计算(北京)有限责任公司 京ICP证150476号 | 京ICP备11018762号 | 京公网安备号11010802020287
Copyright © 2013 - 2025 Tencent Cloud.
All Rights Reserved. 腾讯云 版权所有