Commit cbac27e
committed
feat: Print inverted right-angled triangle with increasing numbers per row
🧠 Logic:
- Outer loop runs from 1 to 5 (rows).
- Inner loop prints numbers from 1 up to (5 - i + 1) for each row.
- Produces an inverted number triangle where the number of elements decreases per row.
Signed-off-by: Somesh diwan <[email protected]>1 parent 93f810e commit cbac27e
1 file changed
+2
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
4 | | - | |
5 | | - | |
6 | | - | |
| 3 | + | |
| 4 | + | |
7 | 5 | | |
8 | 6 | | |
9 | 7 | | |
| |||
0 commit comments