OUTPUT:
2-15
2-21
1-30
Below is an example showing how the program works:
6
15 40 15 21 21 30
OUTPUT:
2-15
2-21
1-30
Press any key to continue
Question 8:
(1 mark, file to be edited: Q8.c)
Your program allows the user to enter an integer array of 'n' elements from the keyboard.
The program swaps the places of the first largest and smallest odd number with each other.
Below is an example:
Enter n = 7; array = {2, 5, 8, 0, 9, 6, 20}
+ 100%
Zoom
Close