This pattern question


this is the url of my code. I am so close but cannot identify the problem

@Aditiverma hey Aditi this will not work
try this thing
the first loop will work i=1 up to n
the second loop will work from j=1 up to i
the third loop will j=1 up to 2*(n-i)-1
now decide how the 4th loop will work I am leaving this you try to implement hint of 4th loop try out between these two loop incrementing or decrementing loop which one fit for the 4 th case

and apply a check on 4th loop
if(j!=n)
cout<<j
3rd loop works for the spaces.

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.