Note AcademyNote Academy

Computer Science · May / June 2022 · Paper 21 · Question 5

2210

As printed in the paper

The question as text

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

Read automatically from the paper; the printed page above is exact.

Show the answer and mark scheme
  • 5(a)[5]

  • 5(b)[2]

Make a free account to save your answers and see your weak topics and ask the AI why a wrong answer is wrong.