17 lines
325 B
C
17 lines
325 B
C
|
/*
|
|||
|
* 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;
|
|||
|
}
|