1 21 321 4321 54321/*C program to print the given number pattern*/
#include<stdio.h>#include<conio.h>
int main()
{int i,j,k;
for(i=1;i<=5;i++)
{
for(j=5;j>=1;j--)
{
if(j<=i)
printf("%d",j);
else
printf(" ");
}
printf("\n");
}
return 0;
}
output
121
321
4321
54321
Comments
Post a Comment