whats wrong with my code??
#include
using namespace std;
int main() {
int n;
cin>>n;
int i,j;
for(i=1;i<=n;i++)
{
for(j=1;j<=(2*n-1);j++)
{
if(j<=i)
cout<<j+" ";
else if((i+j)>=2*n)
cout<<(2*n-j)+" ";
else
cout<<" ";
}
cout<<endl;
}
return 0;
}