Quelpr

CAPE Computer Science Unit 1 · 2009 · Paper 2 · Question 3(c)(i)

Based on the algorithm shown, what are the final values stored in variables c and j when execution terminates?

This question uses a figure or table from the paper — you'll see it when you practise.

The mark scheme is shown once you've answered.

Practise this question

Other parts of this question

  1. 3(a)What is an algorithm?[2 marks]
  2. 3(b)Name THREE basic control constructs used in structured programming.[3 marks]
  3. 3(c)(ii)Referring to specific line numbers, identify and correct the errors in the algorithm so that it generates, prints, and counts the odd numbers between 1 and 99…[6 marks]
  4. 3(c)(iii)Using the corrected algorithm, state the final value of variable c at the end of execution.[1 mark]
  5. 3(d)Construct a flowchart to represent the algorithm shown.[11 marks]

More practice: the rest of this paper · more Algorithm Verification and Development questions · all CAPE Computer Science Unit 1 past papers