Commit cf1a6ca
committed
feat: Print right-angled triangle star pattern using nested loops
🧠 Logic:
- Outer loop controls the number of rows (1 to 5).
- Inner loop prints increasing number of stars per row.
- Each row ends with a newline to form a right-angled triangle.
Signed-off-by: Somesh diwan <[email protected]>1 parent 20c76c9 commit cf1a6ca
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