Wave print column problem

This is my code. I don’t know why I’m getting this error - /bin/run.sh: line 4: 18 Bus error (core dumped) ./exe
#include<bits/stdc++.h>
using namespace std;
int main() {
int m,n;
cin>>m>>n;
int a[m][n];
for(int i=0;i<m;i++)
{
for(int j=0;j<n;j++)
cin>>a[i][j];
}
for(int i=0;i<n;i++)
{
if(i%2==0)
{
for(int j=0;j<m;j++)
cout<<a[j][i]<<", “;
}
else
{
for(int j=m-1;j>=0;j–)
cout<<a[j][i]<<”, ";
}
}
cout<<“END”;
return 0;
}

I have edited your code… Try to submit now…