Ask Question

Write a statement that assigns treeHeight with the height of a tree given the distance from the tree (in feet) and angle of elevation (in degrees).

Use the following formula: tangent of angleElevation treeHeight / treeDistance treeHeight

+5
Answers (1)
  1. 20 August, 10:12
    0
    treeHeight = tangent of angleElevation * treeDistance

    In java, we could write it as:

    double treeHeight = (Math. tan (angleElevation) * treeDistance);

    Math. tan (angleElevation) is an inbuilt java mathematical function used to calculate the tangent of a value and the return value is always double.

    Explanation:

    formula:

    tangent of angleElevation = treeHeight/treeDistance

    We want to assign treeHeight, so we cross-multiply and we get:

    treeHeight = tangent of angleElevation * treeDistance

    Off course, the treeHeight will be in feet also.
Know the Answer?
Not Sure About the Answer?
Find an answer to your question 👍 “Write a statement that assigns treeHeight with the height of a tree given the distance from the tree (in feet) and angle of elevation (in ...” in 📗 Computers & Technology if the answers seem to be not correct or there’s no answer. Try a smart search to find answers to similar questions.
Search for Other Answers