Merge branch 'master' of http://bdgit.educoder.net/pit2o95vh/pmcih9b3q
commit
e7e9070d08
@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<classpath>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-13">
|
||||
<attributes>
|
||||
<attribute name="module" value="true"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="src" path="src"/>
|
||||
<classpathentry kind="output" path="bin"/>
|
||||
</classpath>
|
@ -0,0 +1 @@
|
||||
/bin/
|
@ -0,0 +1,17 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>Educoder</name>
|
||||
<comment></comment>
|
||||
<projects>
|
||||
</projects>
|
||||
<buildSpec>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.jdt.core.javabuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
</buildSpec>
|
||||
<natures>
|
||||
<nature>org.eclipse.jdt.core.javanature</nature>
|
||||
</natures>
|
||||
</projectDescription>
|
@ -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
|
@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<classpath>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
|
||||
<classpathentry kind="src" path="src"/>
|
||||
<classpathentry kind="output" path="bin"/>
|
||||
</classpath>
|
@ -0,0 +1,17 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>open</name>
|
||||
<comment></comment>
|
||||
<projects>
|
||||
</projects>
|
||||
<buildSpec>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.jdt.core.javabuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
</buildSpec>
|
||||
<natures>
|
||||
<nature>org.eclipse.jdt.core.javanature</nature>
|
||||
</natures>
|
||||
</projectDescription>
|
@ -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
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -0,0 +1,9 @@
|
||||
package open;
|
||||
|
||||
public class duishu {
|
||||
|
||||
public double duishu(double a,double b) {
|
||||
return Math.log(a)/Math.log(a);
|
||||
}
|
||||
|
||||
}
|
@ -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("´íÎó");
|
||||
}
|
||||
|
||||
}
|
@ -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;
|
||||
}
|
||||
|
||||
}
|
@ -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;
|
||||
}
|
||||
}
|
@ -0,0 +1,11 @@
|
||||
package open;
|
||||
|
||||
public class zhishu {
|
||||
|
||||
public double zhishu(double a) {
|
||||
return Math.pow(Math.E,a);
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -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;
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in new issue