Program to print triangle Pattern(◤) descending line width using numbers for n number of lines.[Pattern:10]| Using C language| C Program series 31|
👨💻Program to print triangle Pattern (◤) descending line width using numbers for n number of lines.[Pattern:10]
Code :
For n number of LINES:
/*
[Pattern 10]Program to print triangle Pattern using numbers for n number of lines.
For Example:n=5
12345
1234
123
12
1
*/
#include<stdio.h>
main()
{
printf("[Pattern 10]Program to print triangle Pattern using numbers for n number of lines.\n\n");
int i,j,n,temp;
//Here,
//temp for decrease value of n with first loop
//n for number
//i for row
//j for colomn
printf("Enter the number:");
scanf("%d",&n);
temp=n;
for(i=1;i<=n;i++,temp--)
{
for(j=1;j<=temp;j++)
{
printf("%d",j);
}
printf("\n");
}
}
The output of Code:
![Program to print triangle Pattern(◤) descending line width using numbers for n number of lines.[Pattern:10]| Using C language| C Program series 31|](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhyOjGyIcwfIQud1uxRJ4bHW0Y2ig5_ukn-Kg0GlGZ8lly5v5MSENpivLGXZ2RTye-rWmxbV6d0UYjNvwuk6b2b4KsA_cr5AGuBwcEkrwsr4wdoh_qrBw2J8Y7VDpIoxgV1XsjVNeYL5wDcsFLsDGVA5--Q9ztqZMIJkpir2x91es1MkVyY0t1t3_c/w640-h162/Screenshot%202022-10-22%20001028.jpg)
![Program to print triangle Pattern(◤) descending line width using numbers for n number of lines.[Pattern:10]| Using C language| C Program series 31|](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj6THGcrD-gR_aKXSWHKla1AyBnjy8vjWM--4ya7NDU0skPfJx3mtXy0YNGYTATYE7294E7HAWn8eL_PaP8mcolJIOg_EfxyV_cF7IDp0rEJvAYAGDrBx622SB3CJ1ODJAJkFt08Q3JOEP5vJOaAUXFjqWprQbWD1qjYQs_0S1YKdE7F_XDNFb5Kto/w640-h228/Screenshot%202022-10-22%20001048.jpg)
![Program to print triangle Pattern(◤) descending line width using numbers for n number of lines.[Pattern:10]| Using C language| C Program series 31|](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg7uJNGWQfpLKWBxrez065e3gK8mD6EfRuXITw1gBdVZlt23qZ_kj_Z46bzbcCVvMbNK6sHj-2631hFM7j9cOpGlRDooN6Luc2ZadQTxIDT_RZjTjS807I-vVZoT8be5xatdrDvY-kvO7L45i7EzMofmr0UP4kuTrHs_N827aYsG3NruQxZXjM5H9E/w640-h376/Screenshot%202022-10-22%20001113.jpg)
Comments
Post a Comment