hdu 2004 成绩转换
2024-10-07 11:15:43
成绩转换
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 ;
}
最新文章
- node-sass 安装失败的解决措施
- spring mvc 和spring security配置 spring-servlet.xml和spring-security.xml设置
- OPENDATASOURCE读取远程数据库数据中文乱码问题-sqlserver R2
- LOMA280保险原理读书笔记
- 监听EditText变化---TextWatcher 类用法详解
- android studio还不错
- linux下简单文本处理
- poj1149
- 关于windows中的任务管理调度器
- Java中三种常见的注释(注解) Annotation
- Java基础——集合源码解析 List List 接口
- 面向对象和面向过程,python中的类class,python中程序的入口——main方法,
- Apex 单元测试辅助函数简介
- EF中,保存实体报错:Validation failed for one or more entities. 如何知道具体错误在哪?
- Springboot多数据源配置--数据源动态切换
- Git使用教程,从入门到上瘾
- vue 数据劫持 响应式原理 Observer Dep Watcher
- MAC终端安装grunt--javascript世界得构建工具
- mybatis mapper空指针异常的问题
- OA系统与Exchange 日历打通
热门文章
- UVA10361 - Automatic Poetry
- IOS开发--数据持久化篇之文件存储(一)
- Windows安全模式的妙用
- 视频: 千重浪Linux系统调试技术培训 03-01_Basic-CPU-Register
- MyEclipse10.7的 at com.genuitec.eclipse.ast.deploy.core.Deployment.<;init>;
- HDU 4587 B - TWO NODES tarjan
- windows 下的命令行工具。。
- Python基础教程之List对象 转
- 错误解决:release&#39; is unavailable: not available in automatic reference counting mode
- Ruby on Rails Tutorial 第一章 之 搭建开发环境