Answers for "floyd's triangle"

C
0

floyd's triangle

#include <stdio.h>

int main()
{
    int rows,n=1,i,j;
    printf("Enter the numbers of total rows:\n");
    scanf("%d",&rows);
    for(i=1;i<=rows;i++){
        for(j=1;j<=i;j++){
            printf("%d ",n);
            n++;
        }
        printf("\n");
    }

    return 0;
}
Posted by: Guest on August-29-2021

Code answers related to "C"

Browse Popular Code Answers by Language