Follow This Blog For more... 😊

C Program to print Floyd's triangle Pattern using numbers for n number of lines.[Pattern 13]| Using C language| C Program series 34|

👨‍💻C Program to print Floyd's triangle Pattern () using numbers for n number of lines.[Pattern:13]

Code :

For n number of LINES:

   
   /*
    Program to print Floyd's triangle Pattern using numbers for n number of lines.[Pattern 13]
    For Example:n=5
   
    1
    2 3
    4 5 6
    7 8 9 10
    11 12 13 14 15
   
    */
   
    #include <stdio.h>
   
    main()
    {
        int i,j,n,k=1;
       
        printf("Program to print Floyd's triangle Pattern using numbers for n number of lines.[Pattern 13]\n\n");
       
        printf("Enter the number:");
        scanf("%d",&n);
       
        for(i=1;i<=n;i++)
        {
             for(j=1;j<=i;j++)
             {
                printf("%d ",k);
                k++;
             }
                 printf("\n");
        }
    }

The output of Code:






👉Click for more C Program series Questions.[Questions list]

Comments

Popular Posts