C Program to Print Inverted Half Pyramid Using *


Aim :- Write a C Program to Print Inverted Half Pyramid Using Numbers.

C program to For Generating Inverted Half Pyramid Using Numbers.
The Number of Rows Will Be Given By User.


C++ Program Code :


#include<stdio.h>
#include<conio.h>
void main()
{
      int i, j, n;
      clrscr();

      printf("\nC Program To Print Inverted Half Pyramid Using Numbers.");
      printf("\n\nEnter Number of Rows : ");
      scanf("%d",&n);

      for(i=n; i>=1; --i)
      {
            for(j=1; j<=i; ++j)
            {
                  printf("* ");
            }
            printf("\n");
      }

      getch();
}


Output :

Post a Comment

1 Comments

  1. Caliber: MB M13.21 Column-Wheel movementFunctions: Hours, minutes, running seconds, and link chronograph with 30-minute link counterDiameter: 29.50mmPower Reserve: 60-hour power reserveWinding: ManualFrequency: link 18000 bphAdditional Details: Thermally-blued central chronograph and totalizer hands, Bi-directional rotating blue arrow (operated by 18K white gold fluted-bezel), Screw balance with Philips curve, Devil's tail bridge

    ReplyDelete