Trig Ratios

View as PDF

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);

trig ratios

Given an angle in degrees, print the value of its sine, cosine and tangent.

Input

The input is an integer between 0 and 90 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

There are no comments at the moment.