What's wrong in my approach

#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;j++){
cin>>a[i][j];
}
}
int u=0,o=0;

while(o<n){
if(o%2==0){
	for(int i=0;i<m;i++){
		cout<<a[i][o]<<", ";
	}
	o++;
}
if(o%2==1){
	for(int i=m-1;i>=0;i--){
		cout<<a[i][o]<<", ";
	}
	o++;
}
}
cout<<" END";

}

@Harshit-Jha-2364832040305354 please save your code on ide.codingblocks.com and share the link.

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.