the class is 50 students 30 like chocolate, 25 like vanilla, and 18 like both, which like neither.

If 18 like both, then (30-18) like just chocolate and (25-18) like vanilla.

50 - 18 - 12 - 7 = ?

18÷2=9

30-9=21
25-9=16
16+21=37
50-37=13

To determine the number of students who like neither chocolate nor vanilla, we can use the principle of inclusion-exclusion.

Let's start by adding the number of students who like chocolate (30) to the number of students who like vanilla (25). This gives us a total of 55 students. However, we have counted the 18 students who like both flavors twice, so we need to subtract that number once.

55 - 18 = 37

Therefore, 37 students like either chocolate or vanilla. Since there are 50 students in total, we subtract the number of students who like either flavor from the total number of students.

50 - 37 = 13

So, there are 13 students who like neither chocolate nor vanilla.