Triangle of Stars (Baby Steps)

Draw a staircase of stars with n lines: line 1 has one , line 2 has two, and so on up to n stars.

Input: One integer n (1 to 20).

Output: n lines; line i has i stars.

Difficulty: Easy. Write your answer in the browser editor, run the examples, then submit it against hidden tests. Python and JavaScript are free; other languages are part of licode Club.

Hint

  • Loop i from 1 to n.

More Baby Steps practice