Computer Science · May / June 2026 · Paper 22 · Question 5
2210
As printed in the paper
The question as text
The purpose of this pseudocode algorithm is to find the name of a customer using an account ID, which contains letters and numbers. The name of the customer and the account ID are stored in the prepopulated two-dimensional (2D) array Accounts[]. The algorithm would then output the name of the customer. For example, Accounts[1, 1] contains the account ID of the first customer and Accounts[1, 2] contains the name of the first customer. 01 DECLARE Accounts : ARRAY[1:1000, 1:2] OF STRING 02 DECLARE Row : INTEGER 03 DECLARE AccountID : INTEGER 04 OUTPUT "Please enter an account ID " 05 OUTPUT AccountID 06 FOR Row 1 TO 1000 07 CASE OF AccountID = Accounts[Row, 1] 08 THEN 09 OUTPUT "The customer’s name is ", Accounts[1, 2] 10 ENDIF 11 NEXT Row
Read automatically from the paper; the printed page above is exact.
Show the answer and mark scheme
5(a)[4]
5(b)[1]
5(c)[5]
Make a free account to save your answers and see your weak topics and ask the AI why a wrong answer is wrong.

