成绩转换
来源:互联网 发布:剑灵门派时装数据 编辑:程序博客网 时间:2024/04/30 07:06
Problem Description
输入一个百分制的成绩t,将其转换成对应的等级,具体转换规则如下:
90~100为A;
80~89为B;
70~79为C;
60~69为D;
0~59为E;
Input
输入数据有多组,每组占一行,由一个整数组成。
Output
对于每组输入数据,输出一行。如果输入数据不在0~100范围内,请输出一行:“Score is error!”。
Sample Input
56
67
100
123
Sample Output
E
D
A
Score is error!
#include<iostream>#include<cstdio>#include<cstring>#include<iomanip>#include<cmath>#include<map>#include<set>#include<queue>#include<cstdio>#include<algorithm>#include<string>#include<sstream>#include<ctime>#define ll long long#define INF 0x3f3f3f3fint main() { ios::sync_with_stdio(false); int a; while(cin>>a){ if(a>=0&&a<=100){ if(a>=90) cout<<"A"; else if(a>=80) cout<<"B"; else if(a>=70) cout<<"C"; else if(a>=60) cout<<"D"; else cout<<"E"; cout<<endl; }else{ cout<<"Score is error!"<<endl; } } return 0;}
0 0
- 成绩转换
- 成绩转换
- 成绩转换
- 成绩转换
- 成绩转换
- 成绩转换
- 成绩转换
- 成绩转换
- 成绩转换
- 成绩转换
- 成绩转换
- 成绩转换
- 成绩转换
- 成绩转换
- 成绩转换
- 成绩转换
- 成绩转换
- 成绩转换
- 数据字典概述
- 移动游戏视频源码
- 【IOS开发】UIWebview 的缓存策略和验证,以及 web 相关
- hdu1028
- 网络爬虫项目开发日志(五): 爬虫协议初探
- 成绩转换
- 我一波三折的奋斗人生
- Windows10安装memadmin
- Android4.4深入浅出之SurfaceFlinger总体结构
- android与java面试题
- 如何实现internet共享全自动服务
- ubuntu14 16下kinect驱动安装
- Vue.js学习 Item5 -- 计算属性computed与$watch
- error : gnutls_handshake() faild : a TLS warning alert has has been received