Why id it showing error as its working for all inputs

#include
using namespace std;
int main() {int i,j,k,n,l,m,z;
cin>>n;
for(i=1;i<=n;i++)
{
for(j=1;j<=i;j++)
{
cout<<j;
}for(k=1;k<=((n2)-1-(2i));k++)
{cout<<" ";}
if(i!=n)
{
for(z=i;z>0;zā€“)
{

		cout<<z;}}
		if(i==n)
		{for(l=n-1;l>0;l--)
		cout<<l;


		}

cout<<endl;

	}





return 0;

}

hi naman
save ur code to online ide of coding block and then post the link here it will make easy to debug