Error in this code

#include
using namespace std;//
int main() {
int n,m;
cin>>n>>m;
int a[n][m];
for(int i=0;i<n;i++){
for(int j=0;j<m;j++){
cin>>a[i][j];
}
cout<<endl;
}
//for(int i=0;i<n;i++){
// for(int j=0;j<m;j++){
// cout<<a[i][j];
// }
// cout<<endl;
//}

int rs=0,cs=0,re=n-1,ce=m-1;
while(rs<=re && cs<=ce){
for(int i=cs;i<=ce;i++){
cout<<a[rs][i]<<", β€œ;
}rs++;
//cout<<endl<<rs<<endl;
for(int i=rs;i<=re;i++){
cout<<a[i][ce]<<”, β€œ;
}ce–;
//cout<<endl<<ce<<endl;
if(rs<re){
for(int i=ce;i>=cs;i–){
cout<<a[re][i]<<”, β€œ;
}re–;
}
//cout<<endl<<re<<endl;
if(cs<ce){
for(int i=re;i>=rs;i–){
cout<<a[i][cs]<<”, ";
}cs++;
}
//cout<<endl<<cs<<endl;
}
cout<<β€œEND”;
return 0;
}

hi @umnah1103_2205d5eee7973385
Try this -->

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.