#include<stdio.h>
void main()
{
int i,j,k,l,n;
printf("enter the total
number of line");
scanf("%d",&n);
l=1;
for(i=1;i<=n;i++)
{
for(j=1;j<=(n-i);j++)
{
printf("
");
}
for(k=1;k<=i;k++)
{
printf("%d
",l++);
}
printf("\n");
}
}
No comments:
Post a Comment