Manmohan loves pattern 2

Help Manmohan to print pattern of a given number. See the output pattern for given input n = 5.

please tell me my mistake

In line number 8, you have made if (I=1)
Instead make it if (I==1)

1 Like

See by doing this you will get this

1 Like

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.

1 Like