Question 8
OCR Computer Science June 2018 Paper 2GCSE6 marks
On the specification
- 2.1 Algorithms2.2 Programming techniques
Question text
8 OCR town are holding an election with three candidates (A, B and C). An electronic voting booth will be used to allow people to vote. Write an algorithm that: • Allows voters to enter either A, B or C. • Keeps track of how many times each candidate has been voted for. • As soon as one person has finished voting, allows the next person to vote. • At any point allows the official to type in “END”, which will print out the number of votes for each candidate and the total number of votes overall. [6]