Context for question 4
This pseudocode algorithm is intended to store the names of up to 250 runners who finish a race. The names of the runners are stored in a one-dimensional (1D) array Runners[] and their time in seconds in a one-dimensional (1D) array Times[]. After the time for each runner has been entered into the array, the name of the runner and the time of the runner in minutes and seconds are displayed for verification.
Each runner takes 60 minutes or less to finish the race. A time of 60 minutes would be entered as 3600 seconds.
DECLARE Runners : ARRAY[1:250] OF STRINGDECLARE Times : ARRAY[1:250] OF INTEGERDECLARE Index : INTEGERDECLARE RunName : STRINGDECLARE RunTime : STRINGDECLARE RunMins : INTEGERDECLARE RunSecs : INTEGERFOR Index ← 1 TO 250OUTPUT "Enter a runner’s name and then time (in seconds) "INPUT RunNameOUTPUT RunTimeRunMins ← DIV(RunTime, 60)RunSecs ← DIV(RunTime, 60)OUTPUT "Runner’s Name: ", RunNameOUTPUT "Time: ", RunMins, " Minutes ", RunSecs, " Seconds"Runners[Index] ← RunMinsTimes[Index] ← RunTimeNEXT Index