Alphabet Pattern 15 – Pyramid pattern using alphabets in C programming

Spread the love

Alphabet Pattern 15-Pyramid pattern using alphabets in C programming

Pyramid pattern using alphabets in C programming

 

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

A
   BAB
  CBABC
 DCBABCD
EDCBABCDE

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

#include <stdio.h>

int main()
{
    int a,b;
    char CH='A';
    int spaces=4;
    

    for(a=1; a<=5; a++)
    {
       
        for(b=1; b<=spaces; b++)
            printf(" ");
        
       
        for(b=CH; b>='A'; b--)
            printf("%c",b);
        
      
        for(b='B'; b<=CH; b++)
            printf("%c",b);
            
        printf("n");
        CH++;
        spaces--;
    }
 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