Series – 2

Series – 2. Given two integers A and B, print all numbers from A to B inclusively in ascending order if A is less than B, otherwise print them in descending order.

Test Case Input (A, B) Expected Output
1 3
7
3
4
5
6
7
2 5
1
5
4
3
2
1
3 4
4
4