Hourglass Pattern

Moderate
0/80
3 upvotes
Asked in company
ZIGRAM

Problem statement

You are given an integer N and you have to print the following pattern.

For N=5:

Alt Text

For N=6:

Alt Text

Detailed explanation ( Input/output format, Notes, Images )
Input Format:
The first and only line of input contains an integer, that denotes the value of N.
Output Format:
Print the pattern, as described in the problem statement.
Constraints:
1 <= N <= 50
Time Limit: 1 second
Hourglass Pattern
Full screen
Console