Triangle P29973


Statement
 

pdf   zip

thehtml

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

Input

Input consists of a natural number n.

Output

Print n lines, in such a way that the i-th line contains i asterisks.

Public test cases
  • Input

    4
    

    Output

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

    6
    

    Output

    *
    **
    ***
    ****
    *****
    ******
    
  • Information
    Author
    Jordi Petit
    Language
    English
    Translator
    Carlos Molina
    Original language
    Catalan
    Other languages
    Catalan
    Official solutions
    C++ Java Pascal Python
    User solutions
    C C++ Java PHP Python