Cotangent

Report a typo

Write a program that reads an integer representing an angle (in degrees) and prints its cotangent.

Calculate the cotangent as either cosϕsinϕ\frac{cos\phi}{sin\phi} or 1tanϕ\frac{1}{tan\phi}.

Round the result to 10 decimal places.

Take into account that the trigonometric functions sin(), cos() and tan() take an angle in radians. You might need to convert the value from degrees to radians first.

Sample Input 1:

78

Sample Output 1:

0.2125565617
Write a program in Python 3





___

Create a free account to access the full topic