To find the distance \( x \) from the base of the ladder to the wall, we can use the trigonometric relationship involving the cosine of the angle. The formula is:
\[ \cos(\theta) = \frac{\text{adjacent}}{\text{hypotenuse}} \]
In this case, the adjacent side is \( x \) (the distance from the base of the ladder to the wall), and the hypotenuse is the length of the ladder, which is 20 feet. The angle \( \theta \) is given as 50°.
Rearranging the formula gives us:
\[ x = \text{hypotenuse} \cdot \cos(\theta) \]
Plugging in the values:
\[ x = 20 \cdot \cos(50^\circ) \]
Now we calculate \( \cos(50^\circ) \):
\[ \cos(50^\circ) \approx 0.6428 \]
Now substituting this value back in:
\[ x \approx 20 \cdot 0.6428 \approx 12.856 \]
Rounding to the nearest hundredth:
\[ x \approx 12.86 \]
Thus, the distance from the base of the ladder to the building is \( \boxed{12.86} \) feet.