Printing *s as triangles in Java?

Hint: For each row, you need to first print some spaces and then print some stars.
The number of spaces should decrease by one per row, while the number of stars should increase.

For the centered output, increase the number of stars by two for each row.

Leave a Comment