Question 7(b) 2024 · October-November · Paper 22 · 1 mark
Reveal official mark-scheme answer
Official answer for Question 7
Part (b)
Question 1
- It multiplies the input number by one less than itself repeatedly, until the
- It calculates the number of permutations of all the numbers up to the input
Show text version of question
Question 7
Part (b)
Question 7
This pseudocode represents an algorithm.
An input of –1 will terminate the algorithm.
DECLARE Count : INTEGER DECLARE Answer : INTEGER DECLARE Value : INTEGER REPEAT INPUT Value IF Value <> -1 THEN
Answer Value FOR Count Value - 1 TO 1 STEP -1 Answer Answer * Count NEXT Count OUTPUT Answer ENDIF UNTIL Value = -1
Part (b)
State the purpose of this algorithm.
...................................................................................................................................................
.............................................................................................................................................
Why this question appears here
60% 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_22.pdf
