1 N = 5 (5 * 6 / 2 = 15)
2
3 1
4 2 3
5 4 5 6
6 7 8 9 10
7 11 12 13 14 15
1
2
3 int main() {
4
5 int i, j, rows, n = 1;
6 printf("Enter number of rows for floyd's triangle : ");
7 scanf("%d", &rows);
8 printf("Floyd's Triangle !! \n");
9
10 for(i = 0; i < rows; i++) {
11 for(j = 0; j <= i; j++) {
12 printf("%2d ", n++);
13 }
14 printf("\n");
15 }
16
17 return 0;
18 }
1 Enter number of rows for floyd's triangle : 5
2 Floyd's Triangle !!
3 1
4 2 3
5 4 5 6
6 7 8 9 10
7 11 12 13 14 15