成绩转换

Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 117938    Accepted Submission(s): 51743

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 <string>
using namespace std;
int main(){
int score;
while (cin >> score) {
if (score >= && score <= )
{
if(score >=){
if(score >= ){
if (score >= )
cout << "A" << endl;
else
cout << "B" << endl;
}
else
cout << "C" << endl;
} else {
if (score >= )
cout << "D" << endl;
else
cout << "E" << endl;
}
}
else
cout << "Score is error!" << endl;
} //system("pause");
return ;
}

最新文章

  1. node-sass 安装失败的解决措施
  2. spring mvc 和spring security配置 spring-servlet.xml和spring-security.xml设置
  3. OPENDATASOURCE读取远程数据库数据中文乱码问题-sqlserver R2
  4. LOMA280保险原理读书笔记
  5. 监听EditText变化---TextWatcher 类用法详解
  6. android studio还不错
  7. linux下简单文本处理
  8. poj1149
  9. 关于windows中的任务管理调度器
  10. Java中三种常见的注释(注解) Annotation
  11. Java基础——集合源码解析 List List 接口
  12. 面向对象和面向过程,python中的类class,python中程序的入口——main方法,
  13. Apex 单元测试辅助函数简介
  14. EF中,保存实体报错:Validation failed for one or more entities. 如何知道具体错误在哪?
  15. Springboot多数据源配置--数据源动态切换
  16. Git使用教程,从入门到上瘾
  17. vue 数据劫持 响应式原理 Observer Dep Watcher
  18. MAC终端安装grunt--javascript世界得构建工具
  19. mybatis mapper空指针异常的问题
  20. OA系统与Exchange 日历打通

热门文章

  1. UVA10361 - Automatic Poetry
  2. IOS开发--数据持久化篇之文件存储(一)
  3. Windows安全模式的妙用
  4. 视频: 千重浪Linux系统调试技术培训 03-01_Basic-CPU-Register
  5. MyEclipse10.7的 at com.genuitec.eclipse.ast.deploy.core.Deployment.&lt;init&gt;
  6. HDU 4587 B - TWO NODES tarjan
  7. windows 下的命令行工具。。
  8. Python基础教程之List对象 转
  9. 错误解决:release&#39; is unavailable: not available in automatic reference counting mode
  10. Ruby on Rails Tutorial 第一章 之 搭建开发环境