📅  最后修改于: 2022-03-11 14:52:36.134000             🧑  作者: Mango
Scanner in=new Scanner(System.in);
int num=in.nextInt();
System.out.println(Math.sqrt(num)); // the sqrt function gives a value in 'double' data type.