Computer Science · May / June 2025 · Paper 21 · Question 3
0478
As printed in the paper
The question as text
The following pseudocode algorithm uses a count-controlled loop to read in 10 names and store them in the array Rewrite the algorithm in pseudocode, using a condition-controlled loop instead of a count-controlled loop. [4]
Read automatically from the paper; the printed page above is exact.
Show the answer and mark scheme
One mark per bullet point
Count ← 1
Examples
REPEAT
Names[Count] ← Name
OUTPUT "Please enter a name"
INPUT Name
Count ← Count + 1
UNTIL Count > 10
Count ← 1
Or
WHILE Count <= 10 DO
Names[Count] ← Name
OUTPUT "Please enter a name"
INPUT Name
Count ← Count + 1
ENDWHILE
Make a free account to save your answers and see your weak topics and ask the AI why a wrong answer is wrong.

