Pattern with Zeros

there is one extra column that is printing how to remove them and is logic correct or can be done in a more efficient way??

code:- https://ide.codingblocks.com/s/451936

question:- https://online.codingblocks.com/app/player/189104/content/180066/4766/code-challenge

hello @dasvishal60

see the logic is simple if j=1 or j==i then print i otherwise print 0.

check this->

ur updated code->

your code is passing test case but not mine whY??

print space after printing evry number, also u r printing one extra 0, so handle that as well

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.