Pls see and run my code and find the error in it it is nearly same :

#include<bits/stdc++.h>
using namespace std;
int main() {
int n;
cin>>n;
for(int i=1;i<n;i++)
{ int j=0;
for( j=1;j<=i;j++)
{ if (j!=n)
cout<<j<<"\t";
else
cout<<j;
}
int temp=j-1;
for(int k=n;k>i;k–)
{
cout<<"\t"<<"\t";
}
for(int m=1;m<=i;m++)
{

		cout<<temp--<<"\t";
	}
	cout<<endl;
}
return 0;

}

Please Send the link of your code
how to send Link of Code ?
paste you code at

Coding Blocks IDE

Coding Blocks IDE

Coding Blocks Online IDE | Run and check your code

click on file->save->link will be generated
send the link of code generated
it will look like https://ide.codingblocks.com/s/258793

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.