Commit 531a276
committed
feat: Print inverted right-angled triangle with repeated row numbers
🧠 Logic:
- Outer loop runs from 1 to 5 (each row).
- Inner loop prints the current row number `i`, (5 - i + 1) times.
- Pattern creates decreasing rows with the same number printed repeatedly.
Signed-off-by: Somesh diwan <[email protected]>1 parent cbac27e commit 531a276
1 file changed
+3
-5
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 | | |
10 | 8 | | |
11 | 9 | | |
12 | | - | |
| 10 | + | |
0 commit comments