Commit a6959c2
committed
feat: Implement basic calculator supporting +, -, *, /, % with exit on 'x' or 'X'
🧠 Logic:
- Continuously reads operator and two operands from user
- Performs the operation if valid, handles division by zero
- Exits loop if user enters 'x' or 'X'.
Signed-off-by: Somesh diwan <[email protected]>1 parent e8c4066 commit a6959c2
1 file changed
+1
-3
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 | | - | |
10 | 9 | | |
11 | 10 | | |
12 | 11 | | |
13 | 12 | | |
14 | | - | |
15 | 13 | | |
16 | 14 | | |
17 | 15 | | |
| |||
0 commit comments