Floyd's triangle in C
C program to print Floyd's triangle: a user inputs how many rows of the triangle to print. The first four rows of Floyd's triangle are:
1
2 3
4 5 6
7 8 9 10
In Floyd's triangle, the nth row contains n numbers. Total numbers in the triangle of n rows: n*(n+1)/2.
output:
Enter the number of rows of Floyd's triangle to print
5
1
2 3
4 5 6
7 8 9 10
11 12 13 14 15
need an explanation for this answer? contact us directly to get an explanation for this answer