#t10. 百分制转五分制成绩转换
百分制转五分制成绩转换
Convert Percentage Grade to Five-Level Grade
Problem Description
Write a program to convert a percentage grade into a five-level grade. The rules are:
- Greater than or equal to : grade A;
- Less than and greater than or equal to : grade B;
- Less than and greater than or equal to : grade C;
- Less than and greater than or equal to : grade D;
- Less than : grade E.
Input Format
One line giving an integer percentage grade.
Output Format
One line giving the corresponding five-level grade.
Sample Input 1
95
Sample Output 1
A
Sample Input 2
55
Sample Output 2
E
Constraints
input grade
Hint
- Five-band range judgment. Think about whether judging from large to small or small to large lets you write shorter conditions — you need not write both bounds every time.
- Get the boundaries exact: belongs to A, belongs to B.
- Check against the sample:
95→A,55→E.
相关
在以下作业中: