C Programming Code Examples C > Pyramid Patterns Code Examples Print inverted full pyramid - Programs to display pyramid and inverted pyramid using * and digits Print inverted full pyramid - Programs to display pyramid and inverted pyramid using * and digits #include<stdio.h> int main() { int rows, x, j, space; printf("Enter number of rows: "); scanf("%d",&rows); for(x=rows; x>=1; --x) { for(space=0; space < rows-x; ++space) printf(" "); for(j=x; j <= 2*x-1; ++j) printf("* "); for(j=0; j < x-1; ++j) printf("* "); printf("\n"); } return 0; }