005-002-004
If-Else Statement: Grade Evaluation
Easy
Problem Description
If-Else Statement: Grade Evaluation
In this problem, you will create a program that receives a score, uses if-else statements to branch into three cases (80 or above, 60 or above, below 60), determines the grade (A/B/C), and displays the result to standard output.
Learning Objective: Understand conditional branching using if-else statements
Create a program that inputs a score and determines and outputs the grade.
Grading Criteria
- 80 or above: A
- 60 to 79: B
- Below 60: C
Input
Line 1: Score (integer 0-100)
Output
Score: [score]
Grade: [grade]
Example
Input:
85
Output:
Score: 85
Grade: A
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