Print the Sum
Easyjava
Read two integers and print their sum. This is the next step after printing fixed text: reading numbers and doing arithmetic.
Input: one line with two integers separated by a space.
Output: one line: their sum.
Example 1
Input
2 3
Output
5
Example 2
Input
100 -40
Output
60
- -1000000000 <= each integer <= 1000000000
Hint 1
sc.nextLong() reads one whitespace-separated number.
Hint 2
Use long so large values cannot overflow.
Read the two numbers as long values and print their sum. Using long keeps the result correct even when both inputs are near a billion.