fb pixel

Triangles

Painting rectangles is fun, but can you draw a triangle?
Given a single number n, you are asked to draw a triangle of height and width of n that is filled with * symbols.
Input
Output
1
*
2
* **
7
* ** *** **** ***** ****** *******
 
To check your solution you need to sign in
Sign in to continue