In this tutorial, we will discuss Hollow Pyramid Pattern C Programming.
In this topic, we will learn how to create this pattern and inverted pyramid pattern in this language
Hollow Pyramid pattern 1
#include
#include
int main()
{
int rows;
printf("Enter the number of rows to Pyramid: ");
scanf("%d",&rows);
int i,j,k;
for(i=1; i
Hellow Pyramid shape
Hollow Pyramid pattern 2
#include
#include
int main()
{
int rows;
printf("Enter the number of rows to Pyramid: ");
scanf("%d",&rows);
int i,j,k;
for(i=rows; i>=1; i--){//Print each row
for(j=rows; j>i; j--){//Print space for Pyramid shape
printf(" ");
}
for(k=1; k