The arithmetic mean (A.M.) of \( n \) numbers is given by the formula:
\[
\text{A.M.} = \frac{\text{Sum of terms}}{n}
\]
In this case, we are given 6 numbers: 10, 8, 5, 7, \( x \), and 4, and the mean is 8. So, we have:
\[
\frac{10 + 8 + 5 + 7 + x + 4}{6} = 8
\]
Simplifying the sum of the known numbers:
\[
\frac{34 + x}{6} = 8
\]
Now, multiply both sides by 6:
\[
34 + x = 48
\]
Solve for \( x \):
\[
x = 48 - 34 = 14
\]