Project 1: Solve Right Triangle Given two legs

Intro Problem:

Suppose we know:

a) the distance (on the ground) from the base of the wall to the base of the ladder (in feet)

b) the height on the wall where the ladder touches (in feet)


How could we find:

a) The length of the ladder

b) The angle formed by the ground and the ladder

c) The angle formed by the ladder and the wall


The diagram used below is setup differently, but once you understand how to solve the missing parts of the triangle, come back to this ladder problem.

Project 1: Variables 'a' and 'b' have been initialized.  These values represent the legs of a right triangle as shown above.  Working methods called sine, cosine, tangentsineInverse, cosineInverse, tangentInverse.

sine(x) returns sine of x

cosine(x) returns cosine of x

tangent(x) returns tangent of x

sineInverse(x) returns sineInverse of x

cosineInverse(x) returns cosineInverse of x

tangentInverse(x) returns tangentInverse of x

Task: Initialize values for 'c', 'angleA', and 'angleB' that represent the appropriate values.

**If your code works for 5 test cases, you can enter your e-mail address

Universal Computational Math Methods:

pow(5,2) returns 25.0

abs(-3.0) returns 3

sqrt(49.0) returns 7.0