A survey asked students what pets they have. Based on the results, the following statements are all true.
- 20 students have cats.
- 23 students have dogs.
- 3 students have both dogs and cats.
- 5 students have no dogs or cats.
How many students were surveyed?
Grid-in question: work out the answer and enter it as a number.
Show the answer
Correct answer: 45
Let x number of students with only cats as pets.
Let y number of students with only dogs as pets.
Calculate x and y using the given information:
There are 20 students who have cats, and of those 20 students, 3 have both cats and dogs.
Thus,
There are 23 students who have dogs, and of those 23 students, 3 have both cats and dogs.
Thus,
To find the total number of students surveyed, add the number of students who only have cats (x), the number of students who only have dogs (y), the number of students who have both (3), and the number of students who have neither (5):