Commit 241fbde
committed
feat: Find maximum of three numbers using nested if-else
🧠 Logic:
- Compare three integers `a`, `b`, and `c`.
- If `a` is greater than both `b` and `c`, print `a`.
- Else, check if `b` is greater than `c`, then print `b`.
- If neither `a` nor `b` is the greatest, then `c` must be the maximum, so print `c`.
Signed-off-by: Somesh diwan <[email protected]>1 parent 0165a42 commit 241fbde
1 file changed
+4
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
8 | | - | |
| 7 | + | |
9 | 8 | | |
10 | | - | |
11 | | - | |
| 9 | + | |
12 | 10 | | |
13 | 11 | | |
14 | | - | |
15 | | - | |
| 12 | + | |
16 | 13 | | |
17 | 14 | | |
18 | 15 | | |
19 | | - | |
| 16 | + | |
0 commit comments