By Ramarathna PaVaN Kumar.....
My Pages..
Home
C - Programming
JoKe$
Sunday, November 28, 2010
To print floy’s triangle using for loop
#include
#include
main()
{
int i,j,t,row;
printf(“Enter number of rows:”);
scanf(“%d”,&row);
t=1;
for(i=0;i
{
for(j=0;j<=i;j++)
{
if(t<10)
printf(“%d “,t);
else
printf(“%d “,t);
t++;
}
printf(“\n”);
}
getch();
}
Newer Post
Older Post
Home