This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.
packageHello;
importjava.io.*;
importjava.util.*;
importjava.math.*;
publicclassHello{
publicstaticdoublemypow(doublee,doublex){
doubleans=Math.pow(e,x);
returnans;
}
publicstaticdoublemylog(doublea,doublex){
doubleans=Math.log(x)/Math.log(a);
returnans;
}
publicstaticdoublemyadd(doublea,doubleb){
returna+b;
}
publicstaticdoublemysub(doublea,doubleb){
returna-b;
}
publicstaticdoublemymultiply(doublea,doubleb){
returna*b;
}
publicstaticdoublemydivide(doublea,doubleb){
returna/b;
}
publicstaticdoublemysin(doublex){
returnMath.sin(x);
}
publicstaticdoublemycos(doublex){
returnMath.cos(x);
}
publicstaticdoublemytan(doublex){
returnMath.tan(x);
}
publicstaticvoidmain(Stringargs[]){
Scannercin=newScanner(System.in);
System.out.printf("功能表:\n说明:输入add a b执行a+b\n"
+"pow e x\nlog a x\nadd a b\nsub a b\nmultiply a b\n"