Maths topics › A level Further Maths › D1 and algorithms
Follow an algorithm written in words and explain what it does
Try a question
Free worksheet
10 questions on this objective, ready to print.
Download the worksheet (PDF)Worked solution
The working
- Print first, then change \(A\): the number printed is always the value before step 3.
- \(n = 1\): print \(6\). Then \(A = 6 + ((4 \times 1) + 7) = 6 + 11 = 17\) and \(n = 2\).
- \(n = 2\): print \(17\). Then \(A = 17 + ((4 \times 2) + 7) = 17 + 15 = 32\) and \(n = 3\).
- \(n = 3\): print \(32\). Then \(A = 32 + ((4 \times 3) + 7) = 32 + 19 = 51\) and \(n = 4\).
- \(n = 4\): print \(51\). Then \(A = 51 + ((4 \times 4) + 7) = 51 + 23 = 74\) and \(n = 5\).
- \(n = 5\): print \(74\). Then \(A = 74 + ((4 \times 5) + 7) = 74 + 27 = 101\) and \(n = 6\).
- \(n = 6\): print \(101\). Then \(A = 101 + ((4 \times 6) + 7) = 101 + 31 = 132\) and \(n = 7\).
- \(n = 7\): print \(132\). Then \(n\) becomes 8, which is more than 7, so the algorithm stops.
- Answers: (a) 17, 32, 51, 74, 101, 132; (b) \(n = 8\)
Answer: a) 17 b) 32 c) 51 d) 74 e) 101 f) 132 g) 8
Mathster is maths homework, practice and assessment for schools, with animated worked solutions. Try Mathster free for 60 days →
Objectives from the AS and A level subject content for further mathematics (Department for Education). Contains public sector information licensed under the Open Government Licence v3.0.