Tell me the error so that pattern can be traced

#include
using namespace std;
int main()
{
int n,i=1;
cin>>n;
while(i<=n)
{
int space=n-i;
while(space>0)
{
cout<<" ";
space=space-1;
}
int no=1;
while(no<=(2i)-1)
{
if(no==1||i==1||no==(2
i)-1)
cout<<i;
else
{
cout<<i+1;
}
no=no+1;
}
cout<<endl;
i=i+1;
}
}

Hello @Madhavendra-Gupta-2240591552663161,

Please, share your code using Coding blocks IDE.
The way you have shared it, introduced many syntax errors in the code.

Steps:

  1. Paste your code on online Coding Blocks IDE.
  2. Save your code there.
  3. Share the URL generated.