So the 30 students as a percent would be 100, so when solving this problem you would put the 40 over the 100. Now you have to multiply 30 times 40 and divide by a 100, which would equal 12. 12 is how many girls there is so now you have to subtract 30 and 12 which would equal 18. Theres 18 boys in the class.