Floyd's Triangle

#include<stdio.h>
int main()
{
    int i, j, row, count = 1;

    printf("Enter Row Number : ");
    scanf("%d", &row);

    for(i=1; i<=row; i++)
    {
        for(j=1; j<=i; j++)
        {
            printf("%d ", count++);
        }
        printf("\n");
    }

    return 0;
}

Comments