diff --git a/.classpath b/.classpath new file mode 100644 index 0000000..038a0e7 --- /dev/null +++ b/.classpath @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..ae3c172 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/bin/ diff --git a/.project b/.project new file mode 100644 index 0000000..a29c479 --- /dev/null +++ b/.project @@ -0,0 +1,17 @@ + + + Educoder + + + + + + org.eclipse.jdt.core.javabuilder + + + + + + org.eclipse.jdt.core.javanature + + diff --git a/.settings/org.eclipse.jdt.core.prefs b/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000..ef28d2b --- /dev/null +++ b/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,14 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=13 +org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve +org.eclipse.jdt.core.compiler.compliance=13 +org.eclipse.jdt.core.compiler.debug.lineNumber=generate +org.eclipse.jdt.core.compiler.debug.localVariable=generate +org.eclipse.jdt.core.compiler.debug.sourceFile=generate +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning +org.eclipse.jdt.core.compiler.release=enabled +org.eclipse.jdt.core.compiler.source=13 diff --git a/shixun1/java小组作业代码/.classpath b/shixun1/java小组作业代码/.classpath new file mode 100644 index 0000000..51a8bba --- /dev/null +++ b/shixun1/java小组作业代码/.classpath @@ -0,0 +1,6 @@ + + + + + + diff --git a/shixun1/java小组作业代码/.project b/shixun1/java小组作业代码/.project new file mode 100644 index 0000000..8a19fe8 --- /dev/null +++ b/shixun1/java小组作业代码/.project @@ -0,0 +1,17 @@ + + + open + + + + + + org.eclipse.jdt.core.javabuilder + + + + + + org.eclipse.jdt.core.javanature + + diff --git a/shixun1/java小组作业代码/.settings/org.eclipse.jdt.core.prefs b/shixun1/java小组作业代码/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000..3a21537 --- /dev/null +++ b/shixun1/java小组作业代码/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,11 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 +org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve +org.eclipse.jdt.core.compiler.compliance=1.8 +org.eclipse.jdt.core.compiler.debug.lineNumber=generate +org.eclipse.jdt.core.compiler.debug.localVariable=generate +org.eclipse.jdt.core.compiler.debug.sourceFile=generate +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.source=1.8 diff --git a/shixun1/java小组作业代码/bin/open/duishu.class b/shixun1/java小组作业代码/bin/open/duishu.class new file mode 100644 index 0000000..51717b7 Binary files /dev/null and b/shixun1/java小组作业代码/bin/open/duishu.class differ diff --git a/shixun1/java小组作业代码/bin/open/main.class b/shixun1/java小组作业代码/bin/open/main.class new file mode 100644 index 0000000..c2ab00f Binary files /dev/null and b/shixun1/java小组作业代码/bin/open/main.class differ diff --git a/shixun1/java小组作业代码/bin/open/sanjiao.class b/shixun1/java小组作业代码/bin/open/sanjiao.class new file mode 100644 index 0000000..6e15320 Binary files /dev/null and b/shixun1/java小组作业代码/bin/open/sanjiao.class differ diff --git a/shixun1/java小组作业代码/bin/open/sizeyunsuan.class b/shixun1/java小组作业代码/bin/open/sizeyunsuan.class new file mode 100644 index 0000000..2223f35 Binary files /dev/null and b/shixun1/java小组作业代码/bin/open/sizeyunsuan.class differ diff --git a/shixun1/java小组作业代码/bin/open/zhishu.class b/shixun1/java小组作业代码/bin/open/zhishu.class new file mode 100644 index 0000000..47ec234 Binary files /dev/null and b/shixun1/java小组作业代码/bin/open/zhishu.class differ diff --git a/shixun1/java小组作业代码/src/open/diushu.java b/shixun1/java小组作业代码/src/open/diushu.java new file mode 100644 index 0000000..2ac319a --- /dev/null +++ b/shixun1/java小组作业代码/src/open/diushu.java @@ -0,0 +1,9 @@ +package open; + +public class duishu { + + public double duishu(double a,double b) { + return Math.log(a)/Math.log(a); + } + +} \ No newline at end of file diff --git a/shixun1/java小组作业代码/src/open/main.java b/shixun1/java小组作业代码/src/open/main.java new file mode 100644 index 0000000..7a476e8 --- /dev/null +++ b/shixun1/java小组作业代码/src/open/main.java @@ -0,0 +1,58 @@ +package open; +import java.util.Scanner; +public class main { + + public main() { + + } + + public static void main(String[] args) { + double a,c; String b; + Scanner sc = new Scanner(System.in); + a=sc.nextDouble(); + b=sc.next(); + if(b.equals("sin")) { + sanjiao d=new sanjiao(); + System.out.println(d.sanjiao("sin", a)); + } + else if(b.equals("cos")) { + sanjiao d=new sanjiao(); + System.out.println(d.sanjiao("cos", a)); + } + else if(b.equals("tan")) { + sanjiao d=new sanjiao(); + System.out.println(d.sanjiao("tan", a)); + } + else if(b.equals("^")) { + zhishu d=new zhishu(); + System.out.println(d.zhishu(a)); + } + else if(b.equals("log")) { + duishu d=new duishu(); + c=sc.nextDouble(); + System.out.println(d.duishu(a, c)); + } + else if(b.equals("+")) { + sizeyunsuan d=new sizeyunsuan(); + c=sc.nextDouble(); + System.out.println(d.add(a, c)); + } + else if(b.equals("-")) { + sizeyunsuan d=new sizeyunsuan(); + c=sc.nextDouble(); + System.out.println(d.subtract(a, c)); + } + else if(b.equals("*")) { + sizeyunsuan d=new sizeyunsuan(); + c=sc.nextDouble(); + System.out.println(d.multiply(a, c)); + } + else if(b.equals("/")) { + sizeyunsuan d=new sizeyunsuan(); + c=sc.nextDouble(); + System.out.println(d.divide(a, c)); + } + else System.out.println(""); + } + +} diff --git a/shixun1/java小组作业代码/src/open/sanjiao.java b/shixun1/java小组作业代码/src/open/sanjiao.java new file mode 100644 index 0000000..dc8ce40 --- /dev/null +++ b/shixun1/java小组作业代码/src/open/sanjiao.java @@ -0,0 +1,16 @@ +package open; + +public class sanjiao { + +public double sanjiao(String a,double b) { + double c=Math.toRadians(b); + if(a=="sin") + return Math.sin(c); + else if(a=="cos") + return Math.cos(c); + else if(a=="tan") + return Math.tan(c); + return 0; +} + +} diff --git a/shixun1/java小组作业代码/src/open/sizeyunsuan.java b/shixun1/java小组作业代码/src/open/sizeyunsuan.java new file mode 100644 index 0000000..97f21c8 --- /dev/null +++ b/shixun1/java小组作业代码/src/open/sizeyunsuan.java @@ -0,0 +1,32 @@ +package open; + +public class sizeyunsuan { + + public double add(double add1, double add2) { + //ӷ + double result; + result = add1 + add2; + return result; + } + + public double subtract(double sub1, double sub2) { + // + double result; + result = sub1 - sub2; + return result; + } + + public double multiply(double mul1, double mul2) { + //˷ + double result; + result = mul1 * mul2; + return result; + } + + public double divide(double div1, double div2) { + // + double result; + result = div1 / div2; + return result; + } +} diff --git a/shixun1/java小组作业代码/src/open/zhishu.java b/shixun1/java小组作业代码/src/open/zhishu.java new file mode 100644 index 0000000..a5c6677 --- /dev/null +++ b/shixun1/java小组作业代码/src/open/zhishu.java @@ -0,0 +1,11 @@ +package open; + +public class zhishu { + + public double zhishu(double a) { + return Math.pow(Math.E,a); + + } + + +} \ No newline at end of file diff --git a/src/小组协同/sizeyunsuan.java b/src/小组协同/sizeyunsuan.java new file mode 100644 index 0000000..f980641 --- /dev/null +++ b/src/小组协同/sizeyunsuan.java @@ -0,0 +1,32 @@ +package СЭͬ; + +public class sizeyunsuan { + public double add(double add1, double add2) { + //ӷ + double result; + result = add1 + add2; + return result; + } + + public double subtract(double sub1, double sub2) { + // + double result; + result = sub1 - sub2; + return result; + } + + public double multiply(double mul1, double mul2) { + //˷ + double result; + result = mul1 * mul2; + return result; + } + + public double divide(double div1, double div2) { + // + double result; + result = div1 / div2; + return result; + } + +} diff --git a/xjq.txt b/xjq.txt deleted file mode 100644 index a65fdb9..0000000 --- a/xjq.txt +++ /dev/null @@ -1,22 +0,0 @@ -int main() -{ - - double x,k=1,f=1,e,n; - double a=0; - scanf("%lf %lf",&x,&n); - if(n < 0) - printf("error"); - else - { - for(int i = 1;i <= n;i++) - { - - a =pow((double)x,(double)i); - k = k*i; - e = a/k; - f += e; - } - printf("%.6lf",f); - } -return 0; -}