Arrays-Wave print Column Wise test cases wrong

Don’t Whats wrong with the code

#include <bits/stdc++.h>
using namespace std;

int main() {

int m=0, n=0;
long arr[10][10];
cin>>m>>n;

for(int i=0; i<m; i++){
for(int j=0; j<n; j++){
cin>>arr[i][j];
}
}

for(int i=0; i<m; i++){

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

}
cout<<“END”;

return 0;
}

@shubhammittal5114 hey shubham mittal there is modification in your code
for(int j=0;j<n;j++){
if(j%2==0){
for(int i=0;i<m;i++)

{
cout<<arr[i][j]<<", ";

}
}
else
{
for(int i=m-1;i>=0;i–)

{
cout<<arr[i][j]<<", ";

}
}
}

cout<<“END”;