002-004-002
Input Validation: Test Score Check
Easy
Problem Description
Input Validation: Test Score Check
Learning Objective: Check if input is within 0-100 range
In a test score input program, verify score is within valid range (0-100).
Input
Line 1: Score (integer)
Output
Within 0-100:
Valid score
Score: [score] pts
Out of range:
Invalid score
Test Cases
※ Output examples follow programming industry standards
Input:
85
Expected Output:
Valid score Score: 85 pts
Input:
100
Expected Output:
Valid score Score: 100 pts
Input:
120
Expected Output:
Invalidな pts数です
❌ 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 10 free executions remaining
