Since it is not giving the correct output

#include
using namespace std;
int main() {
int m;
int n,i,j;
cin>>m;
cin>>n;
int a[m][n];
for(i=0; i<m; i++){
for(j=0; j<n; j++){
cin>>a[i][j];
}
}
for(i=0; i<m; i++){
if(i%2==0){
for(j=0; j<n; j++){
cout<<a[i][j]<<",";
}
}

else{
	for(j=n-1; j>=0; j--){
		cout<<a[i][j]<<",";
	}
}
}
cout<<"END";
return 0;

}

hi @rathidevesh906_1dcc73a061c159bb, what is the issue? also give space after comma ", "

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.