Print Integers - 3
Given an integer
N. Write a program to print integers from N to 1.
Input
The first line of input is an integer
N.
Explanation
In the given example,
N = 5 the integers from 5 to 1 are 5, 4, 3, 2, 1.
Therefore, the output should be
5
4
3
2
1
Sample Input 1
5
Sample Output 1
5
4
3
2
1
Sample Input 2
3
Sample Output 2
3
2
1
N = int(input())
for i in range(N):
print(N-i)
Comments
Leave a comment