A running club has 200 members who compete in a 1-kilometre running competition every month.
Members’ names are stored in the one-dimensional (1D) array MemberName[]
Each member’s time, in seconds, for the 1-kilometre run will be stored in another one-dimensional (1D) array MemberTime[]
The position of each member’s data in the two arrays is the same. For example, the member stored at index 10 in MemberName[] and at index 10 in MemberTime[] is the same.
The running club awards a small prize to the members who have the top three times. The club also awards certificates to all members with a time under 240 seconds.
Write a program that meets the following requirements:
- allows members’ times to be input twice and verifies that the inputs match
- sorts the arrays
MemberTime[]andMemberName[]in ascending order of time - outputs the member names and times of the members with the top three times and identifies them as First, Second and Third
- stores the names of all the members who will receive a certificate in the array
MemberCertificate[] - outputs a message stating the number of certificates to be printed.
You must use pseudocode or program code and add comments to explain how your code works.
You do not need to initialise the data in the array MemberName[]
You do not need to declare any arrays or variables; you may assume that this has already been done.
All inputs and outputs must contain suitable messages.