why test are failing.
below is my code.
#include
using namespace std;
int main() {
int m,n;
cin>>m>>n;
if(m>1 && m<10){
if(n>1 && n<10){
int a[m][n] = {0};
for(int row =0 ; row<m; row++){
for(int col= 0; col<n; col++){
cin >> a[row][col];
}
cout << endl;
}
//wave print
for(int col = 0; col<n; col++){
if(col%2 == 0){
// Even Col- Top Down
for(int row = 0 ;row<m; row++){
cout<< a[row][col] << " ";
}
}
else{
// Bottom up direction
for(int row = m-1; row >=0;row--){
cout << a[row][col] << " ";
}
}
}
}}
cout <<" END";
return 0;
}