To find the height of the building, we can use the Pythagorean theorem. The ladder, the height of the building, and the ground form a right triangle, where:
- \( a \) is the height of the building (which we want to find),
- \( b \) is the distance from the base of the building to the bottom of the ladder (12 feet), and
- \( c \) is the length of the ladder (21 feet).
The Pythagorean theorem states:
\[ a^2 + b^2 = c^2 \]
Substituting the known values into the equation:
\[ a^2 + 12^2 = 21^2 \]
Calculating \( 12^2 \) and \( 21^2 \):
\[ 12^2 = 144 \] \[ 21^2 = 441 \]
Now substituting these values back into the equation:
\[ a^2 + 144 = 441 \]
Next, isolate \( a^2 \):
\[ a^2 = 441 - 144 \] \[ a^2 = 297 \]
Now take the square root of both sides to find \( a \):
\[ a = \sqrt{297} \]
Calculating \( \sqrt{297} \):
\[ a \approx 17.2 \]
Thus, the height of the building is approximately \( \boxed{17.2} \) feet, rounded to the nearest tenth of a foot.