Past-paper question · 2025 February-March · Paper 22 · Q6(a)

Question 6(a) 2025 · February-March · Paper 22 · 5 marks

Original past-paper question for 6(A)
Original past-paper question for 6(A)
Original past-paper question for 6(A)
Reveal official mark-scheme answer Official mark-scheme answer for 6(A)

Official answer for Question 6

Part (a)

✓
One mark per mark point

Question 5

✓
•
✓
Line 02 / DECLARE Highest : STRING
✓
should be DECLARE Highest : INTEGER
✓
•
✓
Line 05 / Highest 1500
✓
should be Highest 0
✓
•
✓
Line 09 / Total Total + Count
✓
should be Total Total + Numbers[Count]
✓
•
✓
Line 10 / IF Numbers[Count] > Total
✓
should be IF Numbers[Count] > Highest
✓
•
✓
Line 17 / OUTPUT "The average is ", Average / 1000
✓
should be OUTPUT "The average is ", Total / 1000
✓
Cambridge IGCSE – Mark Scheme
✓
0478/22
✓
February/March 2025
✓
PUBLISHED
✓
Question
✓
Answer
✓
Marks

Mark scheme 0478_m25_ms_22.pdf →

Show text version of question

Question 6

Part (a)

Question 6

This pseudocode algorithm is intended to allow 1000 positive integers to be input and stored in

a one-dimensional (1D) array. The integers are added together as they are input and the highest value is identified. At the end of the algorithm, the highest number, the total and the average of the numbers are output.

01 DECLARE Numbers : ARRAY[1:1000] OF INTEGER 02 DECLARE Highest : STRING 03 DECLARE Count : INTEGER 04 DECLARE Total : INTEGER 05 Highest ← 1500 06 Total 0 ← ← 07 FOR Count 1 TO 1000 08 INPUT Numbers[Count] 09 Total ← Total + Count 10 IF Numbers[Count] > Total 11 THEN 12 Highest Numbers[Count] ← 13 ENDIF 14 NEXT Count 15 OUTPUT "The highest number is ", Highest 16 OUTPUT "The total is ", Total 17 OUTPUT "The average is ", Average / 1000

Part (a)

Identify the line numbers of five errors in the pseudocode and suggest a correction for each

error.

Error 1 line number ...................................................................................................................

Correction .................................................................................................................................

...................................................................................................................................................

Question 5

, ,

Error 2 line number ...................................................................................................................

Correction .................................................................................................................................

...................................................................................................................................................

Error 3 line number ...................................................................................................................

Correction .................................................................................................................................

...................................................................................................................................................

Error 4 line number ...................................................................................................................

Correction .................................................................................................................................

...................................................................................................................................................

Error 5 line number ...................................................................................................................

Correction .................................................................................................................................

...................................................................................................................................................

[5]
Topic relevance

Why this question appears here

98% assigned-topic match · Algorithm design and problem-solving

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_m25_qp_22.pdf

Keep practising this topic