public static void main(String[] args)
{
Scanner input = new Scanner(System.in);
System.out.println("Enter a floating point number");
float nA= java.util.Scanner.nextFloat();
double nB= Math.pow(a, 3.5);
System.out.println("nB = nA^3.5" +nB);
}
}
在这个代码我试图允许输入浮点数nA但我不知道如何
答案 0 :(得分:0)
public static void main(String[] args)
{
Scanner input = new Scanner(System.in);
System.out.println("Enter a floating point number");
float nA= input.nextFloat();
double nB= Math.pow(nA, 3.5);
System.out.println("nB = nA^3.5" +nB);
}