Ganesha's pattern

Take as input N, an odd number (>=5) . Print the following pattern as given below for N = 7.




@rishank065,
What exactly is your doubt in this question?