Equilateral Triangle Using nested for loop

How to make a equilateral triangle using nested for loop? The thing that I can do is just a one sided triangle

*

**

***

****

like that , but i need a triangle.

----------*

______**

_____****

____******

something like that . Just disregard -- and __. Hope you can help.

Re: Equilateral Triangle Using nested for loop

You need to know the final base size, and then from that compute back the number of spaces you need to print out (should be 1-less each iteration through).

Re: Equilateral Triangle Using nested for loop

have any codes there? you can show us.. and then we will help you where you get stuck..