Commit a367974
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 a99742e commit a367974
1 file changed
+1
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
8 | 9 | | |
9 | 10 | | |
10 | 11 | | |
| |||
49 | 50 | | |
50 | 51 | | |
51 | 52 | | |
52 | | - | |
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
| |||
78 | 78 | | |
79 | 79 | | |
80 | 80 | | |
81 | | - | |
82 | 81 | | |
83 | 82 | | |
84 | 83 | | |
85 | 84 | | |
86 | 85 | | |
87 | 86 | | |
88 | | - | |
89 | 87 | | |
90 | 88 | | |
0 commit comments