Write code for pattern

Write the code for the following program

1
2 3
4 5 6
7 8 9 10
11 12 13
take input as the number till you want to print the triangle and then discard the no which do not form the triangle like in this case 11,12 ,13

Author: Amit Khandelwal 1
Login to Answer
Sort By:
Oldest
|
Newest
|
Vote
|
My Answer