Quelpr

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

Write an algorithm that uses iteration to find the sum of all multiples of six and all multiples of seven between 100 and 250 exclusive. Use one variable, for example, sumMult, to accumulate the sum of the multiples of both numbers in the given range.

The mark scheme is shown once you've answered.

Practise this question

Other parts of this question

  1. 3(a)(i)Sequence[2 marks]
  2. 3(a)(ii)Selection[2 marks]
  3. 3(a)(iii)Iteration[2 marks]
  4. 3(b)(i)The number of students that voted for EACH of the subjects: Mathematics, English, Spanish.[5 marks]
  5. 3(b)(ii)The TOTAL number of students that voted for Mathematics, English or Spanish.[5 marks]

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