Skip to content

Punitcool/C-Program-For-Printing-Inverted-Pyramid

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 

Repository files navigation

C-Program-For-Printing-Inverted-Pyramid

#include <stdio.h>

// Driver code int main() { int rows = 8, i, j, space;

for (i = rows; i >= 1; --i) { // Loop to print the blank space for (space = 0; space < rows - i; ++space) printf(" ");

   // Loop to print the half of 
   // the star triangle
   for (j = i; j <= 2 * i - 1; ++j)
       printf("* ");
  
   // Loop to print the rest of 
   // the star triangle
   for (j = 0; j < i - 1; ++j)
       printf("* ");
   printf("\n");

}

return 0; }

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published