Question 5:
(1 mark, file to be edited: Q5.c)
The program allows the user to enter an integer array of 'n' elements from the keyboard (n>0).
Sort and print the list of elements in descending order with odd numbers first and even numbers last.
Each printed element is on one line (\n).
Here is an example of how the program will run:
Enter: n = 6, array = [5, 1, 3, 2, 4, 9]
6
5 13 249
4 of 4
Paper No: 3
Zoom
- FUO
+ 100%
OUTPUT:
9
5
3
1
4
2
Press any key to continue
Close