C Program to Print Floyd's Triangle

In this program, you'll learn to Floyd's Triangle.



Source Code
#include <stdio.h>
int main()
{
    int i, j, c=1;
    for (i=0; i<4; i++)
    {
        for (j=0; j<=i; j++)
        {
            printf("%d ", c);
            c++;
        }
        printf("\n");
    }
    return 0;
}
Output
1
2 3
4 5 6
7 8 9 10