Commit 6a4f918
committed
feat: Implement basic sum calculator with repeated user input
🧠 Logic:
- Used `Scanner` to take integer input from the user.
- Reads two numbers (`num1` and `num2`) multiple times and prints their sum.
- Each block prompts for inputs separately and outputs `"The sum = X"`.
- Simple demonstration of `Scanner.nextInt()` and arithmetic operations.
🔑 Key:
- Demonstrates input handling, addition, and console output**.
- Code currently repeats input/output blocks explicitly (no loop yet).
Signed-off-by: Somesh diwan <[email protected]>1 parent a367974 commit 6a4f918
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
| 6 | + | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| |||
0 commit comments