Commit 74ea5a8
committed
feat: Print inverted right-angled triangle star pattern
🧠 Logic:
- Outer loop runs from 1 to 5 for each row.
- Inner loop prints '*' (5 - i + 1) times, decreasing with each row.
- Forms an inverted triangle of stars aligned to the left.
Signed-off-by: Somesh diwan <[email protected]>1 parent 531a276 commit 74ea5a8
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