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.

15 lines
343 B

4 years ago
public class sanjiaohanshu {
public static void intox(double x,int n) {
//x<><78>ʾ<EFBFBD><CABE><EFBFBD><EFBFBD>
double pi=Math.PI;
double a=x*(pi/180);
switch(n){
case 1:
System.out.println(Math.sin(a));break<EFBFBD><EFBFBD>//sinx
case 2:
System.out.println(Math.cos(a));break<EFBFBD><EFBFBD>//cosx
case 3:
System.out.println(Math.tan(a));break<EFBFBD><EFBFBD>//tanx
}
}
}