* * * * *
* * * *
* * *
* *
*
* *
* * *
* * * *
* * * * *
Inverted triangle above, normal below. Mirror image vertically.
No input required.
Fixed number of rows.
Star pattern with:
• Inverted triangle on top
• Normal triangle at bottom
• Vertically mirrored
• Fixed rows (e.g. 5 up + 4 down)
• Nested loops only
The pattern is divided into two parts:
upper inverted triangle and lower normal triangle.
Upper Inverted Triangle
1.Use an outer loop for rows from 0 to n-1.
2.For each row i:
3.Print i leading spaces.
4.Print (n - i) stars with space after each star.
5.Move to the next line.
Lower Normal Triangle
1.Use another outer loop for rows from n-2 down to 0.
2.For each row i:
3.Print i leading spaces.
4.Print (n - i) stars with space after each star.
5.Move to the next line.