Pattern With Zeroes

#include
using namespace std;
int main()
{
int n;
cin>>n;
int i,j;
for(i=1;i<=n;i++)
{
for(j=1;j<=(2n-2);j++)
{
if(j<=n+1-i)
{
cout<<j<<" “;
}
else if((j>=n+2-i)&&(j<=3+i))
{
cout<<”
"<<" “;
}
else
cout<<” ";

	}
	cout<<endl;
}
return 0;

}

I’m able to pass only 2 Test cases ! Please help me