Arrays - Wave Print Column Wise

#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!

@poojagera hey pooja see your second input loop

Oh, i used i, thankyou so much! rookie mistake pfft :sunny:

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.