There are three methods to print the alphabets in a triangle or in a pyramid form.
- range() with for loop
- chr() with for loop
- range() with foreach loop
- Two for loops are used.
- First for loop set conditions to print 1 to 5 rows.
- Second for loop set conditions in decreasing order.