What is the problem in this code?

#include
using namespace std;
int main() {
int i,j,k=1,n,l,m;
cin>>n;
l=n-1;
m=2;
for(i=0;i<n;i++)
{
if(i<=(n/2))
{
for(int space1=1;space1<=l;space1++)
{
cout<<" β€œ;
}
l=l-2;
for(j=i+1;j>=1;j–)
{
cout<<j<<” β€œ;
}
for(int space2=1;space2<=(2*i-1);space2++)
{
cout<<” β€œ;
}
for(j=1;j<=(i+1);j++)
{
cout<<j<<” β€œ;
}
cout<<endl;
}
else
{
for(int space1=1;space1<=m;space1++)
{
cout<<” β€œ;
}
for(j=(n-i);j>=1;j–)
{
cout<<j<<” β€œ;
}
for(int space2=1;space2<=((n-1-i)*2-1);space2++)
{
cout<<” β€œ;
}
for(j=1;j<=(n-i);j++)
{
cout<<j<<” ";
}
m=m+2;
cout<<endl;
}

}
return 0;

}

hello @1ms18im021

go to this link -> https://ide.codingblocks.com/
paste ur code in the editor, press ctrl + s and then save
a url will be generated in ur search bar share that url with me

I am not able to copy my code in the IDE. Can you please copy it yourself from here and see what’s the problem?

it wont compile , becuase here syntax dont render properly. it also introduce unnecessary syntax errors.
for example -> iostream part of your code is not rendering.
ss

so pls follow this procedure and share ur code link->

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.