我的代码不起作用。我正在尝试为x^(3/2)
.
它告诉我我需要“;” 在double TwoThirdPower(double A)
. 在括号中。
public class JFindAlphabet {
static Scanner sc = new Scanner(System.in);
public static void main(String[] Theory) {
JWaffles MyWaffles = new JWaffles();
MyWaffles.ProgramHeading();
double Glasses;
Glasses = 1.0 ;
double TwoThirdPower(double A) {
double x;
x = 0.0;
while ( Math.sqrt(x*x*x) < A ) {
x = x + 0.0001;
}
return x;
}
System.out.println("\n\t" + Glasses + " to the two thirds power = "+ TwoThirdPower(Glasses) );
}
}
任何帮助将不胜感激。