我的作业中有以下几行代码,需要一些数字.我试图找出用于查找数字的平方根的函数.怎么做到这一点?
System.out.println("find the value of c if:");
Scanner kbreader=new Scanner(System.in);
System.out.print("a="+" ");
double a=kbreader.nextDouble();
System.out.print("b=" + " ");
double b=kbreader.nextDouble();
System.out.print("c=" + " " );
System.out.print((a*a)+(b*b));
Run Code Online (Sandbox Code Playgroud)