Submit solution
Points:
3
Time limit:
2.0s
Memory limit:
64M
Author:
Problem type
Allowed languages
Java
Java implements the three basic trigonometry ratios as functions from the Math
class. Each ratio takes an angle in radians and returns the value of the ratio.
Math.sin(double);
Math.cos(double);
Math.tan(double);
Given an angle in degrees, print the value of its sine, cosine and tangent.
Input
The input is an integer between and representing the angle in degrees.
Output
Output the angle's sine, cosine and tangent each on a new line rounded to 2 decimal places. Do not print trailing zeroes. This means that instead of 0.50
, you should output 0.5
.
Sample Input
30
Sample Output
0.5
0.87
0.58
Comments