Spiral print clockwise

what is wrong in my code. why am I getting zeroes in between. can you rcorrect my code.
#include
using namespace std;
int main(){
int arr[100][100],m,n;
cin>>m>>n;
for(int row=0;row<n;row++){
for(int col=0;col<m;col++){
cin>>arr[row][col];
}
}
/for(int row=0;row<n;row++){
if(row%2==0){
for(int col=0;col<m;col++){
cout<<arr[row][col]<<",";
}
}
else{
for(int col=m-1;col>=0;col–){
cout<<arr[row][col]<<",";
}
}
}
cout<<“END”;
}
/
int sr=0,sc=0,er=n-1,ec=m-1;
while(sr<=er and sc<=ec ){
for(int col=sc;col<=sc;col++){
cout<<arr[sr][col]<<",";
}
sr++;
for(int row=sr;row<er;row++){
cout<<arr[row][ec]<<",";
}
ec++;
for(int col=sc;col>=sc;col–){
cout<<arr[er][col]<<",";
}
er–;
for(int row=er;row>=sr;row–){
cout<<arr[row][sc]<<",";
}
sc++;

}
}

Hey @dips123deepali_c25f140838182212 https://ide.codingblocks.com/s/633013 please check out this code and next time plese try to ask your code via link of your code insead of pasting you code directly.

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.