#include
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;++i)
cin>>a[i][j];
}
for(int j=0;j<n;++j)
{ if(j%2==0)
{
for(int i=0;i<m;++i)
{
cout<<a[i][j]<<",";
}
}
else
{
for(int i=m-1;i>=0;++i)
{
cout<<a[i][j]<<",";
}
}
}
cout<<“END”;
return 0;
}
No output is observed.
Please check what is wrong here.
Thanks!