The answer is 120
To find the whole number given the fraction and the number by the fraction, you multiply the number by the reciprocal/inverse of the fraction.
30 * 100/10= 300
So the whole number is 300 and to find 40% just multiply
300 * 40/100 = 120
:D