Triangle. X59144


Statement
 

pdf   zip

html

Write a program that, given a number n, prints a triangle of size n.

Input

A natural number n ≥ 1.

Output

Print n lines (each followed by a newline), such that the ith line contains i asterisks.

Observation

Public test cases
  • Input

    4

    Output

    *
    **
    ***
    ****
    
  • Input

    6

    Output

    *
    **
    ***
    ****
    *****
    ******
    
  • Information
    Author
    Hubie Chen
    Language
    English
    Official solutions
    Java
    User solutions
    Java