Repost of Rotate Question doubt in txt format

#include <iostream>

using namespace std;

void rotate(int arr[][100],int row,int col){

int sr = 0;

int er = row-1;

int sc = 0;

int ec = col-1;

while(ec>=0){

for(int i = sr;i<=col-1;i++){

cout<<arr[i][ec]<<" ";

}

ec–;

cout<<endl;}

}

int main(){

int row;

int col = 0;

cout<<"Enter row : ";

cin>>row;

col = row;

int arr[100][100];

for(int i=0;i<row;i++){

for(int j=0;j<col;j++){

cin>>arr[i][j];

}

}

rotate(arr,row,col);

}

here’s the code ^
don’t mind the indentation as I don’t know how to get it in correct way…

No, the code has syntax errors and logical issues; it won’t correctly rotate the image.

You can refer my code

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.