#include<bits/stdc++.h>
using namespace std;
int main()
{
int arr[10][10],M,N;
int i, j = 0, wave = 1;
cin>>M>>N;
for(int k=0;k<M;k++)
{
for(int l=0;l<N;l++)
{
cin>>arr[k][l];
}
}
while (j <= (N-1)) {
if (wave == 1) {
for (i = 0; i < M; i++)
cout << arr[i][j] << “,”;
wave = 0;
j++;
}
else {
for (i = M - 1; i >= 0; i--)
cout << arr[i][j] << ",";
wave = 1;
j++;
}
}
cout<<“END”;
return 0;
}
Now what is the problem in this code why it is not submitting???