Question: Background The height of an object can be calculated using trigonometry. In this example, a person standing 150 ft. away from a building who's height

 Background The height of an object can be calculated using trigonometry.In this example, a person standing 150 ft. away from a buildingwho's height is 5'10 (5.8 decimal) tall looks up to the top

Background The height of an object can be calculated using trigonometry. In this example, a person standing 150 ft. away from a building who's height is 5'10 (5.8 decimal) tall looks up to the top of a building at an angle of 570. This forms a right triangle where the tangent of the angle is equal to the ratio of the opposite length over the adjacent length of the triangle. To find the height of the building, we need to add the length of the opposite side to the height of the person. 57 5.8ft = = 150 ft. tan (57) Apr/150 building height (tan (570) * 150) + persons height building height (1.54 * 150) + 5.8 building height = 237 ft. Directions Complete the given starting template of the program by coding the missing statements that calculates and outputs the height of a building when given the distance from the building, the angle from the line of sight to the top of the building, and the height of the person_Note: the C++ tan function accepts the angle in radians, so your solution will have to convert degrees to radians using the equation: radians = degrees * (T/180) See tests output below for example operation. Test 1 Output The Height of Building Calculator program Enter your distance from the building (feet): 150 Enter angle for line of sight to top of building (degrees): 57 Enter your height (feet): 5.8 Height of building: 237 Bye Test 2 Output The Height of Building Calculator program Enter your distance from the building(feet): 42 Enter angle for line of sight to top of building (degrees): 43 Enter your height (feet): 5 Height of building: 44 Bye #include #include include using namespace std; 00000000000 ......... 00000000000 int main() { /* Type your code here. */ cout

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!