Grade Calculator
You are given an integer marks. Determine the corresponding grade using the following rules:
- 90–100 → A
- 75–89 → B
- 60–74 → C
- 40–59 → D
- Below 40 → F
Input
- The input contains one integer marks.
Output
Print the grade corresponding to marks without labels or trailing spaces.
Example 1:
Input:
95
Output:
A
Explanation:
95 lies between 90 and 100, so its grade is A.
Example 2:
Input:
40
Output:
D
Explanation:
40 is the minimum mark required for grade D.
Now Your Turn!
Pick the correct output for the given inputInput:
39
Still unsure what the problem is asking ?
Let’s go through a few more examples, step by step, to make it clearer.
Constraints:
- 0 <= marks <= 100