Count Down
You are given an integer N for each test case. Print all integers from N down to 1 in decreasing order.
Input
- The input contains one integer N
Output
Print the integers from N down to 1, separated by a single space, without labels or trailing spaces.
Example 1:
Input:
5
Output:
5 4 3 2 1
Explanation:
For N = 5, print the numbers from 5 down to 1.
Example 2:
Input:
1
Output:
1
Explanation:
For N = 1, only 1 is printed.
Now Your Turn!
Pick the correct output for the given inputInput:
4
Still unsure what the problem is asking ?
Let’s go through a few more examples, step by step, to make it clearer.
Constraints:
- 1 <= N <= 20