Press any key to continue
Question 2:
(1 mark, file to be edited: Q2.c)
Users are required to enter an integer array of five elements containing value of year.
Print out to the screen the leap years. There, a leap year is a year that is divisible by 4 and not by 100; or not divisible by 400.
Below is an example of how the program will run:
2010 2012 2016 2021 2022
OUTPUT:
2012 2016
Press any key to continue
Question 3:
(1 mark, file to be edited: Q3.c)
Your program allows users to enter an integer array of 'n' elements entered from the keyboard.
The system sorts the entered numbers in descending order.
Print out the odd numbers to the screen.
+ 100%
Zoom
Close