Arrays wave column wise

whats wrong with this code
sample test passess
but WA on every test case

https://ide.codingblocks.com/s/60448

You have given the wrong IDE link of the code . Kindly check .

https://ide.codingblocks.com/s/60490

You have to print the space after the ’ , ’ . But you have printed the space before .
So , in line number 16 , correct it by -

cout<<", ";

And also for END. There should be no space.

Hi Pratik, as you are not responding to this thread, I am marking your doubt as Resolved for now. Re-open it if required.

Please mark your doubts as resolved in your course’s “ Ask Doubt ” section, when your doubt is resolved.