13. Grade From Marks
Foundation1000 ms256 MBSolved by 0%
Read a mark out of 100 and print the grade:
| Marks | Grade |
| --- | --- |
| 90 and above | A |
| 80 to 89 | B |
| 70 to 79 | C |
| 60 to 69 | D |
| below 60 | F |
Print a single capital letter and nothing else. Note that each boundary belongs to the
higher grade, exactly 90 is an A, not a B.
Constraints - `0 ≤ marks ≤ 100`
Input
A single line containing one integer n.
Output
Print a single capital letter and nothing else.
Input95
OutputA
Noteis comfortably an A
Input73
OutputC
Noteis in the middle of the C band
Hints
Four rungs, in order. The last two open once you have submitted an attempt. A wrong one counts.
Hint 1Where to start
Hint 2The approachOpen hint 1 first. This one carries on from it.
Hint 3PseudocodeOpen hint 2 first. This one carries on from it.
Hint 4Full solutionOpen hint 3 first. This one carries on from it.