Question #230032

Write a code that reads a number from the user and prints backwards from the number to 1. Use a loop to solve the problem.

Expert's answer

n = int(input())


for i in range(n,0,-1):
    print(i,end=" ")
LATEST TUTORIALS
APPROVED BY CLIENTS