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.
|
|
|
|
package test;
|
|
|
|
|
|
|
|
|
|
import java.util.Scanner;
|
|
|
|
|
|
|
|
|
|
public class Main {
|
|
|
|
|
static double a,b;
|
|
|
|
|
public static double add (double a,double b) {//<2F>ӷ<EFBFBD>
|
|
|
|
|
return a+b;
|
|
|
|
|
}
|
|
|
|
|
public static double sub (double a,double b) {//<2F><><EFBFBD><EFBFBD>
|
|
|
|
|
return a-b;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public static double mult(double a,double b) {//<2F><>
|
|
|
|
|
return a*b;
|
|
|
|
|
}
|
|
|
|
|
public static double div(double a,double b) {//<2F><>
|
|
|
|
|
return a/b;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public static double power(double a,double b) {//<2F><>
|
|
|
|
|
return Math.pow(a,b);
|
|
|
|
|
}
|
|
|
|
|
public static double sqrt(double a) {//<2F><><EFBFBD><EFBFBD>
|
|
|
|
|
return Math.sqrt(a);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public static double log(double a) {
|
|
|
|
|
return Math.log(a);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public static void main(String[] args) {
|
|
|
|
|
Scanner sc = new Scanner( System.in );
|
|
|
|
|
a=sc.nextInt();
|
|
|
|
|
b=sc.nextInt();
|
|
|
|
|
System.out.println(add(a,b)+" "+sub(a,b)+" "+mult(a,b)+" "+div(a,b)+" "+power(a,b)+" "+sqrt(a)+" "+log(a));
|
|
|
|
|
}
|
|
|
|
|
}
|