Program for Flyorid Traingle


Program for Flyorid Traingle
/*floyd triangle*/
#include<stdio.h>
#include<conio.h>
main()
{
int i,j,t=1,n;
clrscr();
printf("enter the value of n");
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