集册 Java实例教程 使用Math.sqrt查找数字的平方根

使用Math.sqrt查找数字的平方根

欢马劈雪     最近更新时间:2020-01-02 10:19:05

482
提示:您可在线编辑运行本教程的实例 - 运行实例,去试试!
使用Math.sqrt查找数字的平方根

public class Main {

 /**from nowjava - 时  代  Java**/

  public static void main(String[] args) {

     System.out.println(Math.sqrt(9));

     System.out.println(Math.sqrt(25.5));

  }

}