java - Determine the square root of a number -


i have following lines of code homework, takes numbers. trying figure function used find square root of number. how 1 this?

 system.out.println("find 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)); 

what's wrong math.sqrt(double)?


Comments

Popular posts from this blog

ASP.NET/SQL find the element ID and update database -

jquery - appear modal windows bottom -

c++ - Compiling static TagLib 1.6.3 libraries for Windows -