008-003-001

Method Call Chain: Calculation Flow

Easy

Problem Description

method Call Chain: Calculation Flow

In this problem, you will create a program that reads an integer, calls a doubling method and an add-ten method sequentially from a process method, and displays each calculation step's result to standard output.

Learning Objective: Call other methods from method

From the process method, call a method that doubles the original value and a method that adds 10, then output each calculation result followed by "Complete".

Input

Line 1: Number (integer)

Output

Original: [number]
Doubled: [result1]
Add 10: [result2]
Complete

Test Cases

※ Output examples follow programming industry standards

Normal case
Input:
5
Expected Output:
Original: 5
Doubled: 10
Add 10: 20
Complete
Normal case
Input:
10
Expected Output:
Original: 10
Doubled: 20
Add 10: 30
Complete

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 10 free executions remaining