#include<iostream.h>
#include<conio.h>
void main()
{
clrscr();
int i=1,j,n,s;
cout<<"\nenter the range";
cin>>n;
s=n;
while(i<=n)
{
for(j=1;j<=(2*s)-2;j++)
cout<<" ";
s--;
for(j=1;j<i;j++)
cout<<j<<" ";
for(j=0;j<i;j++)
cout<<j<<" ";
i++;
cout<<"\n";
}
getch();
}