Help for mirror star pattern

#include
using namespace std;
int main() {
int n;
cin>>n;
int p=(n+1)/2;
for(int i=0;i<=p-1;i++){
for(int s=1;s<=n-3-i;s++){
cout<<" “;
}
for(int j=1;j<=2i+1;j++){
cout<<"
“;
}
cout<<”\n”;
}
for(int a=1;a<=n-p;a++){
for(int b=1;b<=a+1;b++){
cout<<" “;
}
for(int c=1;c<=n-2a;c++){
cout<<"
“;
}
cout<<”\n”;
}

return 0;

}

you can check this code

i have commented the steps so that you can understood

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.