002-004-007
Input Validation: Test Score Check
Easy
Problem Description
Input Validation: Test Score Check
In this problem, you will create a program that reads an integer score from standard input, validates whether it is within the range 0-100 using an if statement, and displays the result to standard output.
Learning Objective: Check if input is within 0-100 range
Read an integer using Scanner, then use conditional branching (if-else) to determine whether the score is within the valid range (0-100), and output the appropriate message.
Input
Line 1: Score (integer)
Output
Within 0-100:
Valid score
Score: [score] pts
```java
Out of range:
```java
Invalid score
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