# Alphabet Pyramid Programs in C

In this tutorial we will going to learn alphabet pyramid building in c. In c we can build various pyramids with numbers , alphabets or stars etc. In this tutorial we learn the alphabet  based pyramids. Using the alphabets we can implement any type of pyramids some examples are as follow:

program – 1

### Implement following alphabet pyramid.

A

BC

DEF

C

OutPut :

Enter number of character till you want pyramid: 3

A

BC

DEF

In above program, as we are implementing the alphabet pyramid. first we entered the number of row till we want to print alphabets that  we taken into the variable n. we require the alphabets A to Z to print that character we taken in c variable. we require iteration for printing for n times we iterated i variable till n and simultaneously we printed the alphabet and incremented the alphabet value so for printing next alphabet. while doing this encounter the end of alphabet so for that again assigned to first alphabet that is A and continue with the program.

program – 2

Implement following alphabet pyramid.

A

AB

ABC

ABCD

ABCDE

ABCDE

ABCD

ABC

AB

A

C

OutPut :

A

AB

ABC

ABCD

ABCDE

ABCDE

ABCD

ABC

AB

A

In above program, as we are implementing the pyramid we break the pyramid into the two parts as upper and lower so that task will be easy. In first half we printed the half portion as ABCDE. and after that we printed the last half.

program – 3

A

ABA

ABCBA

ABCDCBA

ABCBA

ABA

A

C

OutPut :

A

ABA

ABCBA

ABCDCBA

ABCBA

ABA

A