Javatpoint Logo
Javatpoint Logo

Program to print the following pattern

A
B B
C C C
D D D D
E E E E E

Algorithm

  1. Start
  2. Let i be an integer number.
  3. Let j be an integer number.
  4. Repeat step 5 to 7 until all value parsed.
  5. Set i = 0 and check i<4;
  6. Set j = 0 and check j <= i;
  7. Print char(65+i).
  8. End.

To accomplish this task, we need to use two loops, the first loop is responsible for printing the line breaks whereas the second loop is responsible for printing the alphabet.


JAVA

Python

C program

C# program

PHP







Youtube For Videos Join Our Youtube Channel: Join Now

Feedback


Help Others, Please Share

facebook twitter pinterest

Learn Latest Tutorials


Preparation


Trending Technologies


B.Tech / MCA