Star Pattern 10 – Pyramid or triangle pattern using stars in C programming

Spread the love

Star Pattern 10-Pyramid or triangle pattern using stars in C programming

Pyramid or triangle pattern using stars in C programming

In this program, we will see the Pyramid or triangle pattern using stars in C programming language. Please look into the program.

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

The C program for Pyramid or triangle pattern is as follows:

#include <stdio.h>

int main()
{
    int a, b, c;
    for(a=5;a>=1;a--)
    {
        for(b=1;b<a;b++)
        {
            printf(" ");
        }
        for(c=5;c>=a;c--)
        {
            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