CJCoding With Joseph

Add Two Input Numbers

Read two integers from input using a Scanner and print their sum on its own line. For input 4 5 the output is:

9

Use nextInt() twice, then print a + b.

Expected Output:

9
Topics:
Printing
๐Ÿ“ฅ Auto-Input:
4 5\n
This input is automatically fed to your program's stdin
Code Editor
1
Tab to indent ยท Ctrl+Enter to run ยท Ctrl+Space to expand shortcuts (sysout, psvm, fori)

Your Output

Run your code to see the output here...

Test Cases

Run your code to see test case results.