Computer Science, asked by granthsharma41, 2 months ago

Write a program to output following pattern
5 4 3 2 1
4 3 2 1
3 2 1
2 1
1​

Answers

Answered by pranavith16012001
2

Answer:

s=int(input())

for i in range (0, s+1) :

for j in range(s-i, 0,-1) :

print(j, end="")

print()

Explanation:

for explanation ping me 9550026427

Answered by Anonymous
1

The question is being answered by assuming that the user has asked it for python.

Required python programme :-

for i in range(5,0,-1):

for j in range(i,0,-1):

print(j,end="")

print()

Output attached...

Attachments:
Similar questions