Inverted mirror image pyramid pattern in C programming language
/>
In this program, we will see the Inverted mirror image pyramid pattern in C programming language.
********** **** **** *** *** ** ** * *
The C program for above Inverted mirror image pyramid pattern is as follows:
#include<stdio.h> int main() { int i,j, no_rows; int spaces = 0; printf("Enter number of rows for pattern="); scanf("%d",&no_rows); for(i = no_rows; i > 0; i--) { for(j = 0;j < i; j++) { printf("*"); } for(j=0;j< spaces;j++) { printf(" "); } for(j=0;j< i;j++) { printf("*"); } printf("n"); spaces+=2; } getch(); return 0; }