1
2 3
4 5 6
7 8 9 10
2 3
4 5 6
7 8 9 10
To make this program you may use following code -
#include<stdio.h>
#include<conio.h>
#include<conio.h>
void main()
{int n,i,j,s;
printf("enter line number = ");
scanf("%d",&n);
s=1;
for(i=1;i<=n;i++)
{
for(j=1;j<=i;j++)
{printf("%d",s);
s++;
}
printf("\n");
}
getch();
return;
}
{int n,i,j,s;
printf("enter line number = ");
scanf("%d",&n);
s=1;
for(i=1;i<=n;i++)
{
for(j=1;j<=i;j++)
{printf("%d",s);
s++;
}
printf("\n");
}
getch();
return;
}
try out this..............
0 Comments