Given a natural number
N
(N<=15). Fill and display a square two-dimensional array of size
N
x
N
according to the following rule:
1 0 0 0 0
1 1 0 0 0
1 1 1 0 0
1 1 0 0 0
1 0 0 0 0
Each element of the array is separated from another by one space, each line of the array is displayed on a new line
Examples
# |
Input |
Output |
1 |
5 |
1 0 0 0 0
1 1 0 0 0
1 1 1 0 0
1 1 0 0 0
1 0 0 0 0
|