017-002-003
Conditionals: Grade Calculator
Hard
Problem Description
Range Checking
In this problem, you will create a program that receives an integer score, uses consecutive if-else if statements to determine the grade (e.g., 90 or above is A, 80 or above is B, etc.) based on score ranges, and displays the result to standard output.
Test Cases
※ Output examples follow programming industry standards
Input:
95
Expected Output:
Grade: A
Input:
85
Expected Output:
Grade: B
Input:
55
Expected Output:
Grade: F
Input:
90
Expected Output:
Grade: A
Input:
60
Expected Output:
Grade: D
❌ 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
