Star Pattern 7 – Inverted full pyramid in C programming language using star

Spread the love


Inverted full pyramid in C programming language using star

Inverted full pyramid in C programming language using star

In this program, we will see the Inverted full pyramid pattern in C programming language.


* * * * * * * * *
  * * * * * * *
    * * * * *
      * * *
        *

The C program for above Inverted full pyramid is as follows:

#include<stdio.h>

int main()
{
    int no_rows, spaces, i, j;

    printf("Enter number of rows = ");
    scanf("%d",&no_rows);

    for(i = no_rows; i >= 1; --i)
    {
        for(spaces = 0; spaces < no_rows-i; ++spaces)
            printf("  ");

        for(j=i; j <= 2*i-1; ++j)
            printf("* ");

        for(j=0; j < i-1; ++j)
            printf("* ");

        printf("n");
    }
 getch();
    return 0;
}


Number Series Programs in C programmming

Star Pattern Programs in C programmming

Number Pattern Programs in C programmming

Alphabet Pattern Programs in C programmming


Spread the love

Leave a Comment