Commit d20f278
committed
feat: Add left-aligned decreasing star pattern using nested loops
🧠 Logic:
- Outer loop runs from 1 to 5 for each row.
- Inner loop runs from 1 to (5 - i + 1) to print decreasing stars.
- Pattern displays a left-aligned triangle with decreasing stars per row.
Signed-off-by: Somesh diwan <[email protected]>1 parent 78db5be commit d20f278
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