Simple. Here it is Code: int row,col,sp=4,res; for(col=1;col<=5;col++) { res=sp; for(;sp>0;sp--) printf(" "); res--; sp=res; for(row=1;row<=col;row++) printf("%d ",row); for(row=col-1;row>0;row--) printf("%d ",row); printf("\n"); } It will print as 1,2,... and you can initialize the array elements to have your own characters.