Welcome![Sign In][Sign Up]
Location:
Downloads WEB Code JSP/Java
Title: SquareRoot Download
 Description: Import Java. IO.* Public class SquareRoot {public static void main (String [] args) {System. Print out. (" Enter a positive value: ") Double value = 0 Try {BufferedReader in = new BufferedReader (new InputStreamReader (System..)) String inputLine = in. ReadLine () Value = Double. ValueOf (inputLine). DoubleValue () } catch (Exception exc) {System. Out. Println (" Input error! ") Return } if value (< 0) System. Println. (" Input out Error!!!!!") else {double root = 1 double pre = 0 do {pre = root root = (value/root+ Root)/2 } while ((pre-root > 0.000001) | | (root-pre > 0.000001)) System. Out. Println (The " Root of "value++" is "+ root) }}} You easy to understand this program? On the computer to run the program, check to see if the program finish what function? Try to take advantage of Branch, indentation, empty line for the program, such as space to typesetting, and add the right note. (hint: the so-called program row Version is different from that of d
 Downloaders recently: [More information of uploader 598060231]
 To Search:
File list (Check if you may need any files):
SquareRoot.java
    

CodeBus www.codebus.net