In what concerns the continuous evaluation solving exercises grade during the semester, you should submit until 23:59 of March 10th
(this exercise will still be available for submission after that deadline, but without couting towards your grade)
[to understand the context of this problem, you should read the class #02 exercise sheet]
Can you help the teacher grade the "Programming II" exams?
Write a program that, given a numeric grade G, assigns a corresponding scale based on the following criteria:
Percentage Range | Grade |
---|---|
[90%, 100%] | A |
[70%, 90%[ | B |
[50%, 70%[ | C |
[30%, 50%[ | D |
[0%, 30%[ | E |
The input consists of a single floating-point G representing the grade.
The output should be a single line displaying the corresponding scale (A, B, C, D, E, or NA).
The following limits are guaranteed in all the test cases that will be given to your program:
-150 ≤ G ≤ 150 | Range of grades |
Example Input 1 | Example Output 1 |
65.5 |
C |
Example Input 2 | Example Output 2 |
120 |
A |
Example Input 3 | Example Output 3 |
-42 |
NA |
Example Input 4 | Example Output 4 |
49.98 |
D |