29. Exam Grade Calculator

Acceptance — 0 accepted 0 submissions

Easy
Conditionals
No companies listed
The school converts marks into grades for the report card:
90 to 100 → A
75 to 89 → B
60 to 74 → C
40 to 59 → D
Below 40 → F

Given a student's marks, print the grade.

Input Format
A single integer m, the marks.

Output Format
Print one letter: A, B, C, D or F.

Constraints
• 0 ≤ m ≤ 100

Example 1

Input
95
Output
A

Explanation 95 is between 90 and 100, so grade A.

Example 2

Input
75
Output
B

Explanation 75 is exactly the start of grade B.

Example 3

Input
39
Output
F

Explanation 39 is just below 40, so grade F.

Example 4

Input
60
Output
C

Explanation 60 is the lowest mark for grade C.

Acceptance —
Accepted 0
Submissions 0
Auto-save
Saved Ln 1, Col 1
Submit a solution to see its status here.
Input
Expected Output
A
No results yet
Run your code to test it against the sample cases.
Problem List