I have coded half pattern

please code full pattern using my code


this is code

@mohdkaifalam041,
Your code is not printing anything. Please atleast try to code the logic.

I have explained you the question below and given a hint, Please try yourself first.

Input N is the number of rows.
Given pattern is seen as first spaces ,then numbers ,then spaces and then numbers again.
Till middle row, number of numbers in one batch in a row is equal to row number.
After middle row, number of numbers decreases each time by 1.
The max value in the pattern is in the middle row which is (N/2 +1).

So do the work of spaces first ,then that of numbers in decreasing order, then that of spaces and then that of numbers in increasing order.