```
```**Question:-** *Simple geometry can compute the height of an object from the object's shadow length and shadow angle using the formula: tan(angleElevation) = treeHeight / shadowLength.*

1. Using simple algebra, rearrange that equation to solve for treeHeight. (Note: Don't forget tangent).

2. Complete the below code to compute treeHeight. For tangent, use the tan() function, described in the "math functions" link above.

**Complete solution below:-**

#include <iostream>

#include<conio.h>

#include <cmath>

using namespace std;

int main()

{

float treeHeights, shadowLengths, angleElevations;

cout << " Enter the Length of Shadow : ";

cin >> shadowLengths;

cout << " Enter the Angle of Elevation in Radians: ";

cin >> angleElevations;

treeHeights = shadowLengths * tan(angleElevations);

cout << " \n The height of Tree = " << treeHeights;

treeHeights = shadowLengths * tan(angleElevations);

cout << "\n The height of Tree = " << treeHeights;

return 0;

}

# Our Happy Testimonials

They are fast in responding to homework questions. they have the best technical writers. Thanks for helping me with my programming doubts.

I contact to disklib for homework, they help me out, despite there was some technical issue they gone through extra mile for me and provide me good quality work in first priority. 100% recommended.

Desklib's study resources are best & unique. Their study database is easy to access and easy to use.

100 % recommended.