We can start by using the formula for the mean (average):
Mean = (sum of numbers) / (number of numbers)
We are given that the mean of 3, 15, and another number is 40, so we can set up an equation:
40 = (3 + 15 + x) / 3
Multiplying both sides by 3 yields:
120 = 3 + 15 + x
Simplifying this equation gives:
102 = x
Therefore, the missing number is 102.