Problem: Function and Sorting
Problem description:
• Write a program that accepts a sequence of integers. All the input values should be stored in an array. In this task, the maximum length of the sequence is 1000. Declare the array with an appropriate size accordingly.
• Develop a function that outputs all odd numbers in an increasing order followed by all even numbers in a decreasing order. Users will use -999 to indicate the end of input. Sample inputs and outputs are as follows.
• Sample Input and Output 1:
Enter a sequence of integer (-999 to finish): 1 2 3 4 5 6 7 8 9 -999
1 3 5 7 9 8 6 4 2
• Sample Input and Output 2:
Enter a sequence of integer (-999 to finish): 1 2 3 4 5 -999
1 3 5 4 2