You are on page 1of 1

#include <stdio.

h>
int main()
{
int n,i,j;
printf("Enter no. of lines ");
scanf("%d",&n);
for(i=1;i<=n;i++)
{
for(j=1;j<=n-i;j++)
printf(" ");
for(j=0;j<i;j++)
{
printf("%d",(i+j)%10);
}
for(j=(i+j-2)%10;j>=i;j--)
{
printf("%d",j%10);
}
}
}

printf("\n");

You might also like