123454321
1234 4321
123 321
12 21
1 1 write a program of this pattern
Answers
Answered by
1
The program for this pattern:
123454321
12344321
123 321
12 21
1 1
- #include<stdio.h>
#include<conio.h>
void main()
{
int i,j,k;
for(i=5;i>=1;i--)
{
for(j=1;j<=5;j++)
{
if(j<i)
printf("%d",j);
else
printf(" ");
}
for(j=5;j>=1;j--)
{
if(j<=i)
{
printf("%d",j);
}
else
printf(" ");
}
printf("\n");
}
Similar questions