Share your repls and programming experiences

← Back to all posts
Numerical Patterns
VishalMakwana23 (1)

1) Number Right Triangle
If this pattern is selected by the user, ask them to enter the number of rows they want in this pattern. Output accordingly
1
1 2
1 2 3
1 2 3 4
1 2 3 4 5

2) Sequential Number Right Triangle
If this pattern is selected by the user, ask them to enter the number of rows they want in this pattern. Output accordingly
1
2 3
4 5 6
7 8 9 10
11 12 13 14 15

3) Pascal Triangle
If this pattern is selected by the user, ask them to enter the number of rows they want in this pattern. Output accordingly
1
1 1
1 2 1
1 3 3 1
1 4 6 4 1