HDU 2004 Score Conversion

Source: Internet
Author: User

Score Conversion

Time limit:2000/1000 MS (java/others) Memory limit:65536/32768 K (java/others) total submission (s): 117938 accepte D Submission (s): 51743

Problem Description

Enter a percentile score T, convert it to the corresponding level, the specific conversion rules are as follows: 90~100 is A; 80~89 is b; 70~79 is C; 60~69 is D; 0~59 to E;

Input

There are multiple sets of input data, one for each group, and an integer.

Output

For each set of input data, output one line. If the input data is not in the 0~100 range, output one line: "Score is error!".

Sample Input

56

67

100

123

Sample Output

E

D

A

Score is error!

1#include <iostream>2#include <string>3 using namespacestd;4 intMain () {5     intscore;6      while(Cin >>score) {7         if(Score >=0&& score <= -) 8         {9             if(Score >= -){Ten                 if(Score >= the){ One                     if(Score >= -) Acout <<"A"<<Endl; -                     Else  -cout <<"B"<<Endl; the                 } -                 Else -cout <<"C"<<Endl; -}Else {  +                 if(Score >= -) -cout <<"D"<<Endl; +                 Else Acout <<"E"<<Endl; at             } -         } -         Else -cout <<"score is error!"<<Endl; -     } -  in     //System ("pause"); -     return 0; to}
View Code

HDU 2004 Score Conversion

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.