007-003-004

Using Classes: Calculator Class

Medium

Problem Description

Using Classes

Call defined class methods to perform calculations. Grouping processing in classes makes them reusable.

.

Test Cases

※ Output examples follow programming industry standards

Input:
10
3
Expected Output:
A + B = 13
A - B = 7
Input:
100
50
Expected Output:
A + B = 150
A - B = 50
Input:
0
0
Expected Output:
A + B = 0
A - B = 0
❌ 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