001-005-004

Variable as Value Assignment: Number Copy

Easy

Problem Description

variable as Value Assignment: Number Copy

In this problem, you will create a program that initializes an integer variable, copies its value to another variable, and displays both values to standard output.

Learning Objective: Learn how to copy a variable's value to another variable

Overview

When you assign one variable's value to another, the current value is copied. Let's create a program that copies and displays the original number!

Specifications

  • Initialize integer variable original to 100
  • Assign original's value to variable copy
  • Output both values

Output Format

Original: 100
Copy: 100

Test Cases

※ Output examples follow programming industry standards

Input:
Expected Output:
Original: 100
Copy: 100
Input:
Expected Output:
Original: 100
Copy: 100
Input:
Expected Output:
Original: 100
Copy: 100
Input:
Expected Output:
Original: 100
Copy: 100
❌ 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 9 free executions remaining