Difficulty in solving question 8 of this pdf

I’m facing difficulty to solve question no.8 in this pdf.

@navneetsingh871931aesl_05b915f0efaaa74f send me your code and I’ll accordingly guide you with your code.

Actually, I am able to print only have of the pattern, I am confused in solving rest.

@navneetsingh871931aesl_05b915f0efaaa74f use an if condition for the cases where your row >= n/2;