You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
539 B
21 lines
539 B
package test;
|
|
import java.util.Scanner;
|
|
public class sc {
|
|
|
|
private static Scanner in;
|
|
|
|
public static void main(String[] args) {
|
|
in = new Scanner(System.in);
|
|
double x=in.nextDouble();
|
|
double a = Math.toRadians(x);
|
|
double sina= Math.sin(a);
|
|
double cosa= Math.cos(a);
|
|
System.out.println("sin :"+sina);
|
|
System.out.println("cos :"+cosa);
|
|
System.out.println("tan :"+Math.tan(a));
|
|
double cota=sina/cosa;
|
|
System.out.println("cot :"+cota);
|
|
|
|
}
|
|
|
|
} |