18 lines
350 B
18 lines
350 B
5 years ago
|
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)));
|
||
|
}
|
||
|
|
||
|
}
|