You are given an integer N. Print N rows starting from 1 in the triangle order as shown in the explanation.
Explanation:
Given N=5.
The triangle order for the given N is
1
2 6
3 7 10
4 8 11 13
5 9 12 14 15
1
Expert's answer
2021-09-16T15:36:44-0400
N=int(input())
for i in range(N):
v=i+1
d=N-1
for j in range(i+1):
print(format(v,"<4"),end=" ")
v=v+d
d=d-1
print()
Numbers and figures are an essential part of our world, necessary for almost everything we do every day. As important…
APPROVED BY CLIENTS
"assignmentexpert.com" is professional group of people in Math subjects! They did assignments in very high level of mathematical modelling in the best quality. Thanks a lot
Comments
Leave a comment