Http://ide.codingblocks.com/#/s/1490

Pattern problem. I want to generalize this pattern code. My code is working for n=9. Can you help in finding the mistake is in my code since it’s not working for other integer.

http://ide.codingblocks.com/#/s/14902

ur code is running only for n=9 as in for loop u written some constants like 8,3 etc…so, u have to generalise it for n not some specific no.

Exactly, I want to generalize this for any n( in this I guess it will be formed for odd numbers).

yupp, u’r right…
Here is my code check it once…
Link: https://ide.codingblocks.com/#/s/14922