Rhombus. X41913


Statement
 

pdf   zip

html

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

Input

A natural number n ≥ 1.

Output

Print 2*n − 1 lines (each followed by a newline), as shown in the examples. The asterisks on the nth line should not be preceeded by any spaces.

Observation

Public test cases
  • Input

    4

    Output

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

    7

    Output

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