Q8 Write a program to receive value of an angle in degrees and check whether sum of squares of sine and cosine of this angle is equal to 1.
Program: 66
Write a program to receive value of an angle in degrees and check whether sum of squares of sine and cosine of this angle is equal to 1.
Output
Enter the degree of angle: 45 Result is: 1
Trigonometric functions are functions of an angle which are used to relate the angles of a triangle to the lengths of the sides of a triangle. For example, as depicted below, if we have a right triangle with one angle ΞΈ, having a as the opposite, b as the adjacent and c as the hypotenuse, then the following hold true.
sinπ=ππ , cosπ=ππ and tanπ=ππ
Write a program that takes the values of the lengths of the hypotenuse (c) and the adjacent (b) from a user and finds angle π½ by passing these lengths to the function findAngle. After finding and returning the angle π½, your program should covert the angle π½ from degrees into radians using the formula shown below: πππππππ = π180Β°Γπππππππ
The calculated angle π½ should then be displayed both in degrees and radians on the screen.