top of page
070
Write a C Program to print the Following Pattern?
5 5 5 5 5
4 4 4 4
3 3 3
2 2
1
#include<stdio.h>
void main ()
{
int i, j, k;
for (i = 5; i >= 1; i--)
{
for (k = 4; k >= i; k--)
printf (" ");
for (j = i; j >= 1; j--)
printf ("%d ", i);
printf ("\n");
}
}
bottom of page
.png)