Compare commits
No commits in common. 'master' and 'Arithmometer' have entirely different histories.
master
...
Arithmomet
@ -0,0 +1,31 @@
|
||||
package com.wpc;
|
||||
/* --- coding = utf-8 ---
|
||||
* @Time: 2020/8/6 18:34
|
||||
* @Author: 1807310509
|
||||
* @File: Arithmometer.java
|
||||
* @Software: IntelliJ IDEA
|
||||
*/
|
||||
|
||||
public class Arithmometer {
|
||||
private static double result;
|
||||
|
||||
public Arithmometer() {
|
||||
}
|
||||
|
||||
public static double calculator(Double num1,String sign,Double num2) {
|
||||
switch (sign) {
|
||||
case "+":
|
||||
result = num1 + num2;
|
||||
break;
|
||||
case "-":
|
||||
result = num1 - num2;
|
||||
break;
|
||||
case "*":
|
||||
result = num1 * num2;
|
||||
break;
|
||||
case "/":
|
||||
result = num1 / num2;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
}
|
@ -0,0 +1 @@
|
||||
Hello
|
@ -1,7 +0,0 @@
|
||||
public class mypow{
|
||||
double e,x;
|
||||
public double mypow(double e,double x) {
|
||||
double ans=Math.pow(e, x);
|
||||
return ans;
|
||||
}
|
||||
}
|
Loading…
Reference in new issue