Program to print palindrome triangle pattern using numbers for n number of lines.[Pattern:8]| Using C language| C Program series 29|
👨💻Program to print palindrome triangle Pattern using numbers (◣) for n number of lines.[Pattern:8]
Code :
For n number of LINES:
/*
Program to print palindrome triangle pattern using numbers for n number of lines.[Pattern:8]
For Example:n=5
1
121
12321
1234321
123454321
*/
#include<stdio.h>
main()
{
printf("Program to print palindrome triangle (Pattern:8) using numbers for n number of lines.\n\n");
int i,j,n;
//Here,
//n for number
//i for row
//j for colomn
printf("Enter the number:");
scanf("%d",&n);
for(i=1;i<=n;i++)
{
for(j=1;j<=i;j++)
{
printf("%d",j);
}
for(j=i-1;j>0;j--)
{
printf("%d",j);
}
printf("\n");
}
}
The output of Code:
![Program to print palindrome triangle pattern using numbers for n number of lines.[Pattern:8]](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhyFLQ0_EO54KRYxd_h5PKAQB2cZ4o6zmSSqLqIByoVS5UshFTr0hMa8ry1UTrirTkEv3_mQ1S-aBB-9hjy0mpEfbiwK5E-oCAeu_k7dsZZlM7Yna-N5WkcjLe0MYs6VmSpiI6qxiHbW9QHNyxeTNftgSXenElqkxnA7FOMJDxbvwjrC2dU9OisH3g/w640-h124/Screenshot%202022-10-21%20195639.jpg)

![Program to print palindrome triangle pattern using numbers for n number of lines.[Pattern:8]](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgVe7ujvfXg3sOiHdnqTJrtbfhUr7dxMfeYskYwY0cenBxAW4Hyc0aszhxGn7eX7pX8aqSdzAkVTnsAbb_vqe-mJdGnBB7ARpbzvf1TkUxrBgRji484ViI0t82bj_WCKqXAirI_GVpKrJ_A2GAm-vBN1sPdo4RTWUtiX_APeGfw-EZcX7wt2INtfx0/w640-h222/Screenshot%202022-10-21%20195737.jpg)
Comments
Post a Comment