Array wave print column wise doubt

sir could u please point out where did i made mistake
code compilation was successful but failed all test cases while submitting

Check o/p format, do this

if(i % 2 == 0)
		{
			for(j = 0; j < m; j++)
			{
				cout<<a[j][i]<<", ";
			}
		}
		else
		{
			for(j = m-1; j >= 0; j--)
			{
				cout<<a[j][i]<<", ";
			}
		}

Rest everything seems right.

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.