Program in C to print pyramid using nested FOR loops

Write a program in C to print pyramid using nested FOR loops

#include<stdio.h>
#include<conio.h>

void main()
{
            int i,j;
            for(i=5;i>=1;i--)
            {
                        for(j=i;j>=1;j--)
                        {
                                    printf("%d",j);
                        }
                        printf("\n");
            }
}


Post a Comment