0

导入java.lang.*;

类计算器{

double i;

double x= Math.sqrt(i);    //This formula is not working

}

类示例1 {

public static void main(String [] args) {

    Calculator object1 = new Calculator();

    object1.i = Integer.parseInt(args[0]);

    System.out.println("Square root of " + object1.i + " is = " + object1.x);  //i am getting 0.0 
}

}

4

0 回答 0