Computer Science · Oct / Nov 2024 · Paper 22 · Question 7
2210
As printed in the paper
The question as text
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
Read automatically from the paper; the printed page above is exact.
Show the answer and mark scheme
7(a)[5]
7(b)[1]
7(c)[2]
Make a free account to save your answers and see your weak topics and ask the AI why a wrong answer is wrong.

