First N even, descending. Given an integer N, display all even numbers from N to 0 in descending order
Test Case | Input (N) | Expected Output |
---|---|---|
1 | 10 | 10 8 6 4 2 0 |
2 | 5 | 4 2 0 |
3 | 0 | 0 |
Python, Java
First N even, descending. Given an integer N, display all even numbers from N to 0 in descending order
Test Case | Input (N) | Expected Output |
---|---|---|
1 | 10 | 10 8 6 4 2 0 |
2 | 5 | 4 2 0 |
3 | 0 | 0 |