Exam Grade
Time limit1sMemory limit128 MB
Read an integer score from 0 to 100 and print the grade A, B, C, D, or F for its range.
- Level
Easy1 of 10
- Topics
- Implementation
- Solved
- No attempts yet
Problem
Write a program that reads an exam score and prints the matching grade.
A score of 90 to 100 is A, 80 to 89 is B, 70 to 79 is C, 60 to 69 is D, and any lower score is F.
Input
The first line contains the exam score. The score is an integer greater than or equal to 0 and less than or equal to 100.
Output
Print the exam grade on the first line, as one of A, B, C, D, F.