Question 2(b) 2015 · May-June · Paper 21 · 3 marks
Reveal official mark-scheme answer
The answer for this question is in the official mark scheme: open the mark scheme.
Show text version of question
Question 2
Part (b)
Question 2
The pseudocode below is intended to calculate the sum of a sequence of integers input.
The dummy value −1 ends the input.
DECLARE x : INTEGER DECLARE Result : INTEGER x ← 0 Result ← 0 WHILE x <> -1 INPUT x Result ← Result + x ENDWHILE OUTPUT Result
Question 3
Part (b)
Rewrite the pseudocode so that it works correctly.
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
..............................................................................................................................................
Question 4
Why this question appears here
71% assigned-topic match · Programming › Programming basics
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 9691_s15_qp_21.pdf
