Program for Traingle


Program for Traingle
#include<stdio.h>
#include<conio.h>
main()
{
int n,i,j,t=1;
clrscr();
printf("enter the value:");
scanf("%d",&n);
for(i=1;i<=n;i++)
{
for(j=1;j<=i;j++)

{
printf("%3d",t);
t=t+1;
}
printf("\n");
}
getch();
}

No comments:

Post a Comment