Computer Science · May / June 2024 · Paper 22 · Question 7
2210
As printed in the paper
The question as text
An algorithm has been written in pseudocode to find and display the maximum and minimum values in an array of 1000 positive numbers. The array List[] starts at index 1 01 Max List[1] 02 Min List[1] 03 FOR Counter 2 TO 1000 04 IF List[Counter] < Max 05 THEN 06 Max List[Counter] 07 ENDIF 08 IF List[Count] ˂ Min 09 THEN 10 Min List[Counter] 11 ENDWHILE 12 NEXT Counter 13 OUTPUT "Maximum value is ", Max 14 OUTPUT "Minimum value is ", Min
Read automatically from the paper; the printed page above is exact.
Show the answer and mark scheme
7(a)[3]
7(b)[3]
Make a free account to save your answers and see your weak topics and ask the AI why a wrong answer is wrong.

