Question 6(a) 2024 · October-November · Paper 23 · 4 marks
Question 6
Part (a)
Question 6
An incomplete algorithm has been written in pseudocode to count the number of values stored in an array and to find their average. Values have been stored in the array starting at A[1] All the values to be counted are non-zero.
01 DECLARE A : ARRAY[1:50] OF INTEGER 02 DECLARE C : INTEGER 03 DECLARE W : INTEGER 04 DECLARE X : INTEGER 05 W 0 06 C ................................................................................................. 07 WHILE A[C] <> 0 08 W ................................................................................................. 09 C
10 ENDWHILE 11 X .................................................................................................
Part (a)
Complete the given pseudocode algorithm.
Why this question appears here
98% assigned-topic match · Programming › Programming concepts
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 0478_w24_qp_23.pdf
