Question 4(a) 2025 · October-November · Paper 21 · 6 marks
Reveal official mark-scheme answer
Official answer for Question 4
Part (a)
Question 6
Show text version of question
Question 4
Part (a)
Question 4
A program contains a global 1D array Number consisting of 20 elements of type REAL
values will be assigned to elements of the array using four steps:
Step 1: store the first value in the sequence in the first element of the array Step 2: check each subsequent value input. If this value is larger than the previous value input, then assign the value to the next array element, otherwise go to step 4 Step 3: repeat from step 2 unless the array is full Step 4: output the count of the number of values stored in the array together with a suitable message.
Part (a)
Complete the pseudocode for Store()
All variables used in the algorithm must be declared.
PROCEDURE Store()
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
ENDPROCEDURE
* 0000800000007 * DFD
Question 7
, ,
Why this question appears here
71% assigned-topic match · Algorithm design and problem-solving › Algorithms
Topic-match percentages estimate how closely each question fits the selected syllabus topic. They are a guide for choosing stricter or broader practice.
Permanent source page: Educate A Change · From 9618_w25_qp_21.pdf
