004-002-001
Else If: Grade Classification
Easy
Problem Description
Else If: Grade Classification
Learning Objective: Perform multi-level conditional branching with else if
Evaluate test score in 5 levels. Display A-E grade based on score.
Input
Line 1: Score (integer)
Output
Score: [score] pts
Grade: [A/B/C/D/E]
```java
Criteria: 80+ A, 60+ B, 40+ C, 20+ D, <20 E.
Test Cases
※ Output examples follow programming industry standards
Input:
85
Expected Output:
Score: 85 pts Rating: A
Input:
55
Expected Output:
Score: 55 pts Rating: C
Input:
60
Expected Output:
Score: 60 pts Rating: B
❌ Some tests failed
Your Solution
Current Mode:● My Code
99
1
2
3
4
5
6
7
8
9
10
›
⌄
⌄
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
// Write your code here
sc.close();
}
}
0 B / 5 MB
You have 6 free executions remaining
