30.WAP to display Following pattern

 

CODE:


n=int(input("How many rows\n"))
for i in range(n,0,-1):
for j in range(1,i+1):

print(j,end=" ")
print()

OUTPUT:

How many rows

4

1 2 3 4 

1 2 3 

1 2 


Comments

Popular posts from this blog