Computer Science · May / June 2016 · Paper 21 · Question 2
2210
As printed in the paper
The question as text
Read this section of program code that inputs 10 positive numbers and then outputs the smallest number input. 1 Small = 1000 2 Counter = 0 3 REPEAT 4 INPUT Num 5 IF Num < Small THEN Small = Num 6 Counter = Counter + 1 7 UNTIL Counter = 10 8 PRINT Small
Read automatically from the paper; the printed page above is exact.
Show the answer and mark scheme
2(i)(ii)[3]
3 marks maximum, 1 mark for each change correctly included. 1 Large = 0 2 Counter = 0 3 REPEAT 4 INPUT Num 5 IF Num > Large THEN Large = Num 6 Counter = Counter + 1 7 UNTIL Counter = 10 8 PRINT Large [3]
Make a free account to save your answers and see your weak topics and ask the AI why a wrong answer is wrong.

