Page not loading? Try clicking here.
Placeholder

#1329

Star triangle 3 1s 32MB

Problems

Given the height 𝑁 of a triangle, write a program that prints the triangle in the shape shown below.

[N = 7]

*
 ***
  *****
   *******
  *****
 ***
*

Input

The height 𝑁 is given.

  • 𝑁 is a positive odd integer not exceeding 100.


Output

Print the shape corresponding to the given height N.

If the input value is outside the specified range, output INPUT ERROR!.


Example #1

7
*

***
*****
*******
*****
***
*

Example #2

5
*
***
*****
***
*


Source

JUNGOL

You must sign in to write code.