C++ | Drawing a right angle triangle of alphabets


This program is to draw a right angled triangle of alphabets in c++. You can also call this pyramid but it doesn’t look like real pyramid. However you can see my next posts for drawing a real pyramid. The program draw the triangle directly no need to input any thing. This program is extendable. Go enjoy the program. Lets begin…….

Program to draw a right angled triangle of alphabets.

void main()
//clear the screen.
//declare variable type int and char
int i,j;
char a='a';
//print triangle
cout<<a<<” “;
//get character


b c
d e f
g h i j
k l m n o

How does it work

No need to input anything. Directly prints the triangle.

Extending it

The program can be extended by extending the number of rows and columns. Go ahead and extend it…..


  1. Include ‘iostream.h’ and ‘conio.h’ files.
  2. Add void main.
  3. Start program by first clearing the screen.
  4. Declare the variables as int (name them as you want.)
  5. Add the loop for number of rows.
  6. Add loop inside the loop added before for number of columns.
  7. Print the alphabet.
  8. Increase alphabet by one.
  9. The triangle is automatically generated.

At the end

You learnt creating the c++ program of Drawing a right angled triangle of alphabets in c++. So now enjoy the program.

Please comment on the post and share it.
And like it if you liked.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s