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.
33 lines
532 B
33 lines
532 B
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;
|
|
}
|
|
}
|