成绩转换

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 ;
}

hdu 2004 成绩转换的更多相关文章

  1. HDOJ 2004 成绩转换

    #include<cstdio> #include<iostream> using namespace std; int main() { int score; while ( ...

  2. HDOJ2004成绩转换

    成绩转换 Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total Submis ...

  3. 成绩转换 AC 杭电

    成绩转换 Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others) Total Submi ...

  4. 杭电OJ2004——成绩转换

    /*成绩转换Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total Submi ...

  5. HDOJ2004_成绩转换

    水题:用数组标识各个阶段分数的等级即可. HDOJ2004_成绩转换 #include<stdio.h> #include<stdlib.h> #include<math ...

  6. hdu2004 成绩转换【C++】

    成绩转换 Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total Submis ...

  7. 【ACM】hdu_2004_成绩转换_201307261516

    成绩转换Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total Submiss ...

  8. 2004 ACM 成绩转换 两种方法

    题目:http://acm.hdu.edu.cn/showproblem.php?pid=2004 中文题目,简单题. 题意:将分数转换成ABC制 查表法 #include <stdio.h&g ...

  9. HDU 2004 (水)

    题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=2004 题目大意: 给你成绩让你根据成绩打分解题思路: 简单的if...else 应用 需要注意是,if ...

随机推荐

  1. Gym 100507J Scarily interesting! (贪心)

    Scarily interesting! 题目链接: http://acm.hust.edu.cn/vjudge/contest/126546#problem/D Description This y ...

  2. thymeleaf比较符号问题

    比较器与平等: 值表达可以是>.<.> =.< =符号,像往常一样,也是= =和!=操作符可以用来检查平等,但是>.<.> =.< =不能用,要用gt ...

  3. [iOS基础控件 - 7.0] UIWebView

    A.基本使用 1.概念 iOS内置的浏览器控件 Safari浏览器就是通过UIWebView实现的   2.用途:制作简易浏览器 (1)基本请求 创建请求 加载请求 (2)代理监听webView加载, ...

  4. UVaLive 6628 Grachten (水题,数学)

    题意:给定一个平面图形并且且给了几条连,求一条. 析:简单么,三角形相似,很简单就AC. 代码如下: #pragma comment(linker, "/STACK:1024000000,1 ...

  5. CSS实现子级窗口高度随低级窗口高度变化

    纯粹使用使用height:100%;或者height:auto;来定义内部容器自适应高度,都无法实现让内部容器高度随着外部父容器高度变化而变化,所以我们必需要使用position绝对定位属性来配合协助 ...

  6. hash_map vs unordered_map vs map vs unordered_set

    hash_map vs unordered_map 这两个的内部结构都是采用哈希表来实现.unordered_map在C++11的时候被引入标准库了,而hash_map没有,所以建议还是使用unord ...

  7. ASP.NET- 使用NPOI导入导出标准Excel

    尝试过很多Excel导入导出方法,都不太理想,无意中逛到oschina时,发现了NPOI,无需Office COM组件且不依赖Office,顿时惊为天人,怀着无比激动的心情写下此文. 曾使用过的方法 ...

  8. C++的辅助工具介绍

    1 文档类  (1) Doxygen  参考站点:http://www.doxygen.org  Doxygen是一种适合C风格语言(如C++.C.IDL.Java甚至包括C#和PHP)的.开放源码的 ...

  9. iOS 逆向之ARM汇编

    最近对iOS逆向工程很感兴趣. 目前iOS逆向的书籍有: <Hacking and Securing IOS Applications>, <iOS Hacker's Handboo ...

  10. nginx安装-源码编译

    官方文档:http://nginx.org/en/docs/configure.html 参考:http://jingyan.baidu.com/article/e2284b2b45f693e2e61 ...