For Floyed triangle , we use a nested loop . One to control the rows and other to control the numbers being printed.
Here is the code.
int n, i, c, a =1;
printf("Enter the number of rows of Floyd's triangle to print\n");
for(i =1; i <= n; i++) // controls the printing of rows.
for(c =1; c <= i; c++)// controls the printing of numbers
printf("%d ",a); // prints 1 in the first row.
a++; // 1 increases to 2 and so on..
printf("\n"); // enters next line.
To find detailed explanation of the program , have a look at the below attached file to supplement your understanding of the video.