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