This is a nested for loop program in which we are going to see how to print the above pattern of the inverted triangle of numbers, with the help of the C Programming language.
#include <stdio.h>
int main()
{
int n, i, j;
printf("Enter rows \n");
scanf("%d", &n);
for (i = n; i >= 1; i--)
{
for (j = i; j >= 1; j--)
{
printf("%d", j);
}
printf("\n");
}
return 0;
}
#ENJOY CODING
Post a Comment
FOR ANY DOUBTS AND ERRORS FEEL FREE TO ASK. YOUR DOUBTS WILL BE ADDRESSED ASAP