#include
using namespace std;
int main() {
int c,arr[10][10],r;
cin>>r>>c;
for(int i=0;i<r;i++){
for(int k=0;k<c;k++){
cin>>arr[i][k];
}
}
for(int i=0;i<c;i++){
if(i&1){
for(int j=r-1;j>=0;j–){
cout<<arr[j][i]<<",";
}
}
else{
for(int j=0;j<r;j++){
cout<<arr[j][i]<<",";
}
}
}
cout<<“END”;
return 0;
}
Wave print question-please tell what is the problem coding is showing desired result but wrong test case
@Jun18APP0112 your code is absolutely fine, just change “,” to ", " in line number 14 and 19.
Just add a space after comma.