For the answer to the question above, this is a right triangle problem using the tangent function.
Tan(x) = Opposite (O) / Adjacent (A)
x = 40 degrees
A = 30 ft
Solve for O
O= Tan (x) * A
O = Tan (40) * 30
Use your calculator or whatever method to get the tangent of 40 degrees (which is .84)
O = .84 * 30
O = 25.2 Ft