In addition to printing stars, you can also print number-based pyramid patterns. Instead of using *, the program will print numbers in each row. There are several variations to explore.
Lastly, let’s explore a variant where the numbers start from the current row number and decrement down to 1. For example, for 4 rows, the pattern would look like this:Copy code12 13 2 14 3 2 1