(1 mark, file to be edited: Q5.c)
Your program allows users to enter an integer array of 'n' (n>0) elements from the keyboard.The program puts even and odd elements in separate arrays. And then prints out two lines of result on the screen. The elements of an even array are sorted ascending, and the elements of an odd array are sorted descending.
Here is an example of how the program will run:
4 of 4
Paper No: 7
Enter: n = 6, array = [5, 1, -3, 2, 8, 15]
6
51-3 2 8 15
OUTPUT:
28
15 5 1-3
Press any key to continue
Zoom
+ 93%
Close