Question 5

OCR Computer Science November 2020 Paper 2AS4 marks

On the specification

(a)
2.2 Problem solving and programming
(b)
2.2 Problem solving and programming
(c)
2.2 Problem solving and programming
(d)
2.2 Problem solving and programming
Question text

5 Given the following procedure: procedure maths(number) a = (number DIV 10) * 10 b = a + 10 if (number – a) >= (b – number) then print(b) else print(a) endif endprocedure (a) State the value printed by the procedure maths if number=27 [1] (b) State the value printed by the procedure maths if number=14 [1] (c) State the value printed by the procedure maths if number=10 [1] (d) State the purpose of the procedure maths. [1]