C Program to Print Inverted Half Pyramid Using '*'



In this program we will print inverted half pyramid using *



  1. //C program to print inverted half pyramid using '*'
  2. #include <stdio.h>
  3. int main()
  4. {
  5. int i, j, rows;
  6. printf("Enter number of rows: ");
  7. scanf("%d",&rows);
  8. for(i=rows; i>=1; --i)
  9. {
  10. for(j=1; j<=i; ++j)
  11. {
  12. printf("* ");
  13. }
  14. printf("\n");
  15. }
  16. return 0;
  17. }

Output


Output!