Advertisement

Reverse pyramid (Using star)

#include<stdio.h>
#include<conio.h>
int main()
{
int i,j,k;
for(i=5;i>=1;i--)
{
  for(k=5;k>=i;k--)
    {
      printf(" ");
    }

 for(j=1;j<=2*i-1;j++)
 {
 printf("*");
 }
printf("\n");
}
getch();
return 0;
}


No comments:

Post a Comment

Please comment bellow. Share your knowledge