002-003-002

Numeric Input: Test Score Input

Easy

Problem Description

Numeric Input: Test Score Input

Learning Objective: Input multiple integers with nextInt()

In a test score management program, input subject and score to display them.
Practice inputting multiple numbers in sequence.

Input

Line 1: Subject (string)
Line 2: Score (integer)

Output

================================
     Test Result
================================
Subject: [subject]
Score: [score] pts
================================

Test Cases

※ Output examples follow programming industry standards

Input:
数学
85
Expected Output:
================================
    Test Results
================================
Subject: Math
Score: 85 pts
================================
Input:
English
92
Expected Output:
================================
    Test Results
================================
Subject: English
Score: 92 pts
================================
Input:
国語
100
Expected Output:
================================
    Test Results
================================
Subject: Japanese
Score: 100 pts
================================
❌ Some tests failed
❌ エラー発生

Your Solution

Current Mode: My Code
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