You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
|
/*
|
|
|
|
|
* C Program to Display Floyd’s triangle
|
|
|
|
|
*/
|
|
|
|
|
#include <stdio.h>
|
|
|
|
|
|
|
|
|
|
main( )
|
|
|
|
|
{
|
|
|
|
|
int i, j, k = 1;
|
|
|
|
|
printf("floyds triangle is\n");
|
|
|
|
|
for( i = 1; k <= 20; ++i )
|
|
|
|
|
{
|
|
|
|
|
for( j = 1; j <= i; ++j )
|
|
|
|
|
printf( "%d ", k++ );
|
|
|
|
|
printf( "\n\n" );
|
|
|
|
|
}
|
|
|
|
|
return 0;
|
|
|
|
|
}
|