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