Getting only last column

Don’t know what’s wrong with this code, I copied from video as it is?
PLZ HELP

hey @vidit123,
There was some changes to be made in last for loop.
Have a look here. https://ide.codingblocks.com/s/289227

I hope this would help you understand the problem.
Thank you and Happy Learning :slightly_smiling_face:.