Please help me correct the error in my code.Please help

#include
using namespace std;
int main(){
int N;
cin>>N;
int row;
for(row=1;row<=N;row++){
if(row==1 || row==N){
for(int x=1;x<=N;x++){
cout<<"";
}
cout<<endl;
}
if(row<(n+1/2) && row>1){
for(int x=1;x<=(N/2);x++){
cout<<"
";
}
cout<<" “;
for(int x=1;x<=(N/2);x++){
cout<<”";
}
cout<<endl;
}
if(row==(N+1/2)){
cout<<"
";
for(int x=1; (x <= (N-2)) ;x++){
cout<<" “;
}
cout<<”"<<endl;
}
if(row>(N+1/2) && row<N){
for(int x=1;x<=(N/2);x++){
cout<<"
";
}
cout<<" “;
for(int x=1;x<=(N/2);x++){
cout<<”*";
}
cout<<endl;
}
}
}

@shresth_2000 please share your code by saving it on cb ide

Now please help me

@shresth_2000 please Share proper code that can be run on IDE copy paste the code from wherever you saved it on your computer and if you didn’t then please make changes in this code only, but this cannot be run

Now Please help me correct my code .It is not even running correctly upto middle row,please help me

@shresth_2000 this output is too wrong, lets start from the scratch
divide the pattern such that you can see its symmetry

     * * *| * *
     * *  | * *
     *    |   *
___________________
     * *  | * *
     * * *| * *

Notice that left and right half are symmetrical
Now, you have to print n/2 + 1 stars in the first row, and 0 spaces.
From row = 0 till row = n/2 this pattern continues, but number of stars decrease by 1 and number of spaces increase by 2.

Try to code it now, let me know if you are stuck anywhere. Code just 1 part first, then try to fill the rest of pattern thrpugh symmetrical/ similar 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.