In a class of 40 students 25 speak Hausa 16 speak igbo 21 speak yoruba and each of the student speaks at least three Language if 8 speak Hausa and igbo ,11speak Hausa and yoruba and,6 speak igbo and,yoruba how,many people,speak all three languages

Let's denote the number of students who speak only Hausa as A, only Igbo as B, only Yoruba as C, the number of students who speak Hausa and Igbo as D, Hausa and Yoruba as E, Igbo and Yoruba as F, and all three languages as G.

We know that:
A + D + E + G = 25
B + D + F + G = 16
C + E + F + G = 21
D = 8
E = 11
F = 6

Now, we can substitute the values of D, E, and F into the equations above:
A + 8 + 11 + G = 25
B + 8 + 6 + G = 16
C + 11 + 6 + G = 21

Solving these equations, we get:
A + G = 6
B + G = 1
C + G = 4

Now, we add these equations to get:
A + B + C + 3G = 11

Given that A + B + C + D + E + F + G = 40, we substitute the values of D, E, and F and simplify:
A + B + C + 8 + 11 + 6 + G = 40
A + B + C + 25 + G = 40
A + B + C + G = 15

Subtracting this equation from our previous sum, we get:
3G = 26
G = 8.67

Since we can't have a fraction of a person, we conclude that 8 people speak all three languages.