![]() |
REVERSE A-PYRAMID |
/*Program to Print Reverse A Pyramid*/
#include<stdio.h>
#include<conio.h>
void main()
{
int i,j;
int n,a;
clrscr();
printf("\n Enter the number of the rows.");
scanf("%d",&n);
a=n;
for(i=0;i<=n;i++)
{
printf("*");
for(j=0;j<=a;j++)
if(a==n/2+1)
printf("*");
else
printf(" ");
a--;
printf("*");
printf("\n");
}
getch();
}
No comments:
Post a Comment