Recursive pattern with closure X59159


Statement
 

pdf   zip

html

Deduce from the given examples what has to be done in this problem. Find a solution with a RECURSIVE function/procedure, which writes to the output.

Input

The input has several cases. Each case consists of a positive natural number in one line.

Output

For each case, a recursive sequence is drawn on the output, followed by a blank line. Pay attention to the examples to deduce what the output has to be for each input.

Public test cases
  • Input

    1
    2
    3
    4
    5
    

    Output

    *
    
    **
    *
    *
    *
    **
    
    ***
    **
    *
    *
    *
    **
    **
    *
    *
    *
    **
    **
    *
    *
    *
    **
    ***
    
    ****
    ***
    **
    *
    *
    *
    **
    **
    *
    *
    *
    **
    **
    *
    *
    *
    **
    ***
    ***
    **
    *
    *
    *
    **
    **
    *
    *
    *
    **
    **
    *
    *
    *
    **
    ***
    ***
    **
    *
    *
    *
    **
    **
    *
    *
    *
    **
    **
    *
    *
    *
    **
    ***
    ****
    
    *****
    ****
    ***
    **
    *
    *
    *
    **
    **
    *
    *
    *
    **
    **
    *
    *
    *
    **
    ***
    ***
    **
    *
    *
    *
    **
    **
    *
    *
    *
    **
    **
    *
    *
    *
    **
    ***
    ***
    **
    *
    *
    *
    **
    **
    *
    *
    *
    **
    **
    *
    *
    *
    **
    ***
    ****
    ****
    ***
    **
    *
    *
    *
    **
    **
    *
    *
    *
    **
    **
    *
    *
    *
    **
    ***
    ***
    **
    *
    *
    *
    **
    **
    *
    *
    *
    **
    **
    *
    *
    *
    **
    ***
    ***
    **
    *
    *
    *
    **
    **
    *
    *
    *
    **
    **
    *
    *
    *
    **
    ***
    ****
    ****
    ***
    **
    *
    *
    *
    **
    **
    *
    *
    *
    **
    **
    *
    *
    *
    **
    ***
    ***
    **
    *
    *
    *
    **
    **
    *
    *
    *
    **
    **
    *
    *
    *
    **
    ***
    ***
    **
    *
    *
    *
    **
    **
    *
    *
    *
    **
    **
    *
    *
    *
    **
    ***
    ****
    *****
    
    
  • Information
    Author
    PRO1
    Language
    English
    Translator
    Original language
    Catalan
    Other languages
    Catalan Spanish
    Official solutions
    C++
    User solutions
    C++