004-001-003
Conditional Branching: Grade Evaluator
Medium
Problem Description
In this problem, you will create a program that evaluates an input score (0–100) using conditional branching and displays the corresponding grade (A–F) to standard output.
Problem Overview
Create a program that inputs a test score and displays the grade evaluation.
Input Format
Receive 1 line of input:
- Score (integer from 0 to 100)
Output Format
Display grade based on the following criteria:
- 90 and above: A
- 80 to 89: B
- 70 to 79: C
- 60 to 69: D
- Below 60: F
Output format: Score: [score] -> Grade: [grade]
Notes
- Display "Invalid score" for scores below 0 or above 100.
Ready to Try Running Code?
Log in to access the code editor and execute your solutions for this problem.
Don't have an account?
Sign Up