Question 5(b) 2022 · May-June · Paper 21 · 2 marks
Reveal official mark-scheme answer
Official answer for Question 5
Part (b)
Question 2
Show text version of question
Question 5
Part (b)
Question 5
The pseudocode represents an algorithm.
The pre-defined function DIV gives the value of the result of integer division. For example, Y = 9 DIV 4 gives the value Y = 2
The pre-defined function MOD gives the value of the remainder of integer division. For example, R = 9 MOD 4 gives the value R = 1
First ← 0 Last ← 0 INPUT Limit FOR Counter ← 1 TO Limit INPUT Value IF Value >= 100 THEN IF Value < 1000 THEN First ← Value DIV 100 Last ←Value MOD 10 IF First = Last THEN OUTPUT Value ENDIF ENDIF ENDIF NEXT Counter
Part (b)
Describe the purpose of the algorithm.
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
.............................................................................................................................................
Question 12
Why this question appears here
99% 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 2210_s22_qp_21.pdf
