01: import java.util.Scanner;
02: 
03: /**
04:    This program computes square roots of inputs supplied
05:    through System.in.
06: */
07: public class RootApproximatorHarness4
08: {  
09:    public static void main(String[] args)
10:    {  
11:       Scanner in = new Scanner(System.in);
12:       boolean done = false;
13:       while (in.hasNextDouble())
14:       {  
15:          double x = in.nextDouble();
16:          RootApproximator r = new RootApproximator(x);
17:          double y = r.getRoot();
18:          
19:          System.out.println("square root of " + x
20:                + " = " + y);
21:       }
22:    }
23: }