CAPE Computer Science Unit 1 · 2014 · Paper 2 · Question 3(b)(i)
A secondary school is doing a survey on students' favourite subjects. Students are asked to vote for any of four choices: Mathematics, English, Spanish, none. If Mathematics, English or Spanish is not the favourite, students vote "none". Assume that on the day of the survey, 100 students are present. Also assume that all votes are valid. Write an algorithm to find and print:
The number of students that voted for EACH of the subjects: Mathematics, English, Spanish.
The mark scheme is shown once you've answered.
Practise this question