Alphabet Pattern 14-Inverted Pyramid pattern using alphabets in C programming
In this program, we will see the Inverted Pyramid pattern using alphabets in C programming language. Please look into the program.
ABCDEDCBA ABCD DCBA ABC CBA AB BA A A
The C program for the Pyramid or triangle pattern using alphabets is as follows:
#include <stdio.h> int main() { int a,b; char CH='E'; int spaces=1; for(a=1; a<=5; a++) { for(b='A'; b<=CH; b++) printf("%c",b); if(a==1) printf("b"); for(b=1; b<spaces; b++) printf(" "); for(b=CH; b>='A'; b--) printf("%c",b); printf("n"); CH--; spaces++; } getch(); return 0; }