Code is not running

// wave print
#include<bits/stdc++.h>
using namespace std;

int main() {
int m,n;
cin>>m>>n;
int a[10][10];
for(int i=0;i<m;i++){
for(int j=0;j<n;j++){
cin>>a[i][j];
}
}
for(int j=0;j<n;j++){
if(j%2==0)
for(int k=0;k<m;k++){
cout<<a[k][j]<<",";
}
else
for(int k=m-1;k>=0;k–){
cout<<a[k][j]<<",";
}
}
cout<<“END”;
}

Hello @daspradhi1812 please wait i am chekcong your code.

Hello @daspradhi1812 this is the corrected code.


if you have any doubt you can ask here:
Happy Learning!!

1 Like

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.

1 Like