What is wrong in my code

my code is falling in case 3 , what is the problem here :-

#include
using namespace std;

int main()
{

int i;int n; int b; int t; int w=0; int z=0;int q;int s ; int m;int f; int c ;
int h=1;int o; int e ; int y ; 
cin>>n;
if(n<=0 || n>10)
{
	return 0;
}
b=n-1;
for(q=0;q<n;q++)
{
    for(t=1;t<=b;t++)
    {
        cout<<'\t';
    }
    
    
    z=z+1-w;
    w++;
    for(i=1;i<=w;i++)
    {
        cout<<z;
        z++;
        cout<<'\t';
    }
    
    b--;
    //cout<<'\n';
    s=z-1;
    for(m=1;m<=q;m++)
    {
        s--;
        cout<<s<<'\t';
    }
    cout<<'\n';
}

for(f=n-1;f>=1;f--)
{
    for(c=1;c<=h;c++)
    {
        cout<<'\t';
    }
    h++;
    s--;
    for(o=1;o<=f;o++)
    {
        cout<<s<<'\t';
        s++;
    }
    s=s-f;
    //cout<<'\n';
    
    e=s+1;
    for(y=f-1;y>=1;y--)
    {
        e--;
        cout<<e<<'\t';
        
    }
    cout<<'\n';
    e=e+y;
    e--;
    
}

}