003-001-001
Arithmetic Operators: Points Addition
Easy
Problem Description
Arithmetic Operators: Points Addition
Learning Objective: Learn to add numbers using the addition operator (+) to calculate cumulative points
Calculate total points on a point card. Input last month's and this month's points to display the total.
Input
Line 1: Last month's points (integer)
Line 2: This month's points (integer)
Output
Last month: [points1] pt
This month: [points2] pt
Total: [points1+points2] pt
Test Cases
※ Output examples follow programming industry standards
Input:
120 85
Expected Output:
Last month: 120 pt This month: 85 pt Total: 205 pt
Input:
500 1500
Expected Output:
Last month: 500 pt This month: 1500 pt Total: 2000 pt
Input:
0 0
Expected Output:
Last month: 0 pt This month: 0 pt Total: 0 pt
❌ Some tests failed
Your Solution
Current Mode:● My Code
99
1
2
3
4
5
6
7
8
9
10
›
⌄
⌄
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
