Question 7:
(1 mark, file to be edited: Q7.c)
Your program allows users to enter an array of 'n' integers, where 'n' is entered by the user (n < 10).
The program prints the square value of odd numbers and sorts them in descending order.
Below is an example:
Enter n = 5, array = {5, 4, 3 7, 8)
5
54378
OUTPUT:
49 25 9
Press any key to continue
Question 8:
(1 mark, file to be edited: Q8.c)
Your program allows the user to enter an array of 'n' integers, where 'n' is entered by the user.
The program prints duplicate elements that are odd numbers to the screen. There is a newline character between any two adjacent numbers.
Below is an example:
+ 100%
Zoom
Close