Skip to content

Commit

Permalink
Merge pull request #20 from Komal-99/pyramids
Browse files Browse the repository at this point in the history
Pyramids
  • Loading branch information
unnati914 authored May 25, 2021
2 parents 92d9e14 + 4c84a6d commit dd96a07
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions patterns/reverse_half_pyramid
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
/*
Enter the number of rows: 7
*******
******
*****
****
***
**
*

*/
#include<stdio.h>
void main()
{
int a,b,rows;
printf("Enter the number of rows: ");
scanf("%d", &rows);
for(a=rows;a>0;a--)
{
for(b=1;b<=a;b++)
{
printf("*");


}
printf("\n");
}
}

0 comments on commit dd96a07

Please sign in to comment.