diff --git a/d.java b/d.java new file mode 100644 index 0000000..ed92315 --- /dev/null +++ b/d.java @@ -0,0 +1,15 @@ +public class sanjiaohanshu { + public static void intox(double x,int n) { + //x±íʾ¶ÈÊý + double pi=Math.PI; + double a=x*(pi/180); + switch(n){ + case 1: + System.out.println(Math.sin(a));break£»//sinx + case 2: + System.out.println(Math.cos(a));break£»//cosx + case 3: + System.out.println(Math.tan(a));break£»//tanx + } +} +} \ No newline at end of file