$25
Question 1 (Working with Arrays)
Write a program that keeps the exam marks for 20 students in an array of doubles. The marks should be read from the user. Invalid marks should not be accepted (marks should be 1 to 100). The program should include functions to calculate and return the following:
a) The lowest mark and the highest mark
b) The average marks
c) The percentage of students who passed (marks above or equal 50)
The program should then display all the calculated values.
Question 2 (Structures)
Write a program that declares a structure named Event to store the following information about an event:
- Event id
- Event type (e.g. Birthday, Wedding, Meeting, etc)
- Location of the event
- Date of the event (consists of day, month, and year – declared as a separate structure)
- Time of the event (consists of hour, minute, and second – declared as a separate structure)
Your program should read several event records from the user into an array of structure Event. Then display all the events in a tabular format.