Add Two Numbers
Easyjavapythonccpp
Learn the Concept: Introduction to JavaRead two space-separated integers a and b from standard input and print their sum.
Example 1
Input
2 3
Output
5
Example 2
Input
10 -4
Output
6
- -1000000000 <= a, b <= 1000000000
Hint 1
Split the input line on whitespace.
Hint 2
Use 64-bit integers to be safe.
Parse both integers, add them, print the result.
Submit an attempt to unlock the solution. (Sign in first.)
Related Problems
- Print Hello WorldEasy · java, python, c, cppSolve Problem
- Check Even or OddEasy · java, python, c, cppSolve Problem
- Hello in Two LinesEasy · javaSolve Problem