commit
99976f4534
@ -0,0 +1,17 @@
|
||||
import java.util.Scanner;
|
||||
|
||||
public class logax {
|
||||
|
||||
public static void main(String[] args) {
|
||||
System.out.println("计算logax");
|
||||
Scanner in =new Scanner(System.in);
|
||||
|
||||
System.out.println("输入a:");
|
||||
int a=in.nextInt();
|
||||
System.out.println("输入x:");
|
||||
int x=in.nextInt();
|
||||
|
||||
System.out.println("log"+a+" "+x+" = "+(Math.log(x)/Math.log(a)));
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in new issue