Full pyramid pattern in C programming language using stars
In this program, we will see the inverted full pyramid pattern in C programming or the full triangle pattern.
* * * * * * * * * * * * * * *
The C program for above full pyramid pattern is as follows:
#include<stdio.h> int main() { int i,j,no_rows; int spaces=4; printf("Enter number of rows for pattern = "); scanf("%d",&no_rows); for(i=0;i< no_rows;i++) { /*printing spaces first, before printing star */ for(j=0;j< spaces;j++) { printf(" "); } for(j=0;j<=i;j++) { printf("* "); } printf("n"); spaces--; /* decrementation of one space after one row*/ } getch(); return 0; }