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

Question 6(c) 2025 · February-March · Paper 22 · 4 marks

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

Official answer for Question 6

Part (c)

✓
One mark per mark point, max four

Question 4

✓
MP1
✓
Declaration of new variable for smallest value at start of algorithm/before it is used
✓
MP2
✓
Initialisation of smallest variable to a high number / the first input
✓
MP3
✓
New selection statement after input to compare input with current smallest number
✓
MP4
✓
If input is smaller than current smallest variable, it should replace it
✓
MP5
✓
Outside the loop, output the current value of the smallest variable.
✓
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 (c)

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 (c)

Explain how you could change the corrected algorithm so that it also finds the smallest

number that was input and outputs its value at the end.

Any code used must be fully explained.

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

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

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

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

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

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

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

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

[4]

Question 6

, ,

Topic relevance

Why this question appears here

99% assigned-topic match · Programming › Programming concepts

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