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:
![C Program to print Floyd's triangle Pattern using numbers for n number of lines.[Pattern 13]](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgmhcKYP-Vrk1T_lCFgKx3oZYXBV3L37W_KMVm5IXNFOvftFVP5tDEBbiXipgaHN5iJZJsmcGAxV7Prq9d7vlHOP7EjOZ5QVKC4iidsvKCjW07UPsgYyNYzOfpdvZ7ZgsM7c74Ye6nEAoYVvuylAQvYXP03ZZcC-kCP9EDNbtt6GKrFEWWym_vij5U/w640-h148/Screenshot%202022-11-02%20200504.jpg)
![C Program to print Floyd's triangle Pattern using numbers for n number of lines.[Pattern 13]](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgRKz5ngslW3zVWDIg4HeYP7L248vZBxXsgC_Tc6yjeE0jh6HnBhnOsdZC3hNbL5SsbgwrPkgAg9QXrvncy36g_EctAjGVZShPX79XxYzUtM75ywy2X59ZeXm7Jc58r1GZA7DJALClPlzP9KJzBu-Bjj4fi0ZGHpPyedxI7I7ulQc10Lae36z5N0xo/w640-h206/Screenshot%202022-11-02%20200545.jpg)
![C Program to print Floyd's triangle Pattern using numbers for n number of lines.[Pattern 13]](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhIUn56ROMWn17Y_HIbyIyKNE1dCVTbDb-61MhoVNwzlR0KvO41-WYsp9-eH_o_VsJSNIFE2FKUXfaocPQ2BxqXEDiIO0x83qh4yZdOD0uW8VB1QQ2105vrRWy48cTjcoBrtM55Ui2IubiY7MdY4uk_bB4iAcF9V7wMPfv_XAuAiUJSUdnMuX2SNeU/w640-h296/Screenshot%202022-11-02%20200604.jpg)
Comments
Post a Comment