#include
using namespace std;
int main() {
int a[100][100],m,n;
cin>>m>>n;
for(int i=0;i<m;i++){
for(int j=0;j<n;j++)
cin>>a[i][j];
}
for(int j=0;j<m;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;
}
Wave print column wise code not passing,whats wrong in this code?
Change line 10 to for(int j=0;j<n;j++)