A length of a rope is stretched between the top edge of a building and a stake in the ground. The head of the stake is at ground level. The rope also touches a tree that is growing halfway between the stake and the building. If the building is 36 feet tall, how tall is the tree?

Let's call the height of the tree x.

Since the rope touches the top of the building and the top of the tree, the length of the rope is equal to the sum of their heights.

The rope goes from the stake to the building, so its length is also the hypotenuse of a right triangle with legs equal to the height of the building and the height of the tree.

By the Pythagorean theorem, we have x^2 + (36^2) = (2x)^2.

Simplifying this equation, we get x^2 + 1296 = 4x^2.

Rearranging the equation, we get 3x^2 = 1296.

Dividing both sides by 3, we get x^2 = 432.

Taking the square root of both sides, we get x = sqrt(432) ≈ 20.78.

Therefore, the height of the tree is approximately 20.78 feet.