Sunday 21 January 2018

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();
}

0 comments:

Post a Comment