/***************************************
* C Program to print Floyd's Triangle
***************************************/
#include<stdio.h> // include stdio.h
int main()
{
int n, k = 1;
printf("Enter number of lines: \n");
scanf("%d", &n);
printf("\n");
// loop for number of lines
for(int i = 1; i <= n; i++)
{
//loop to print numbers in each line
for(int j = 1; j <= i; j++)
{
printf("%-5d ", k++);
}
printf("\n");
}
return 0;
}