import java.util.*;
import java.io.PrintWriter;
/*************************
*This program asks for a
*number and gives you the square root
*
*@author - Bryan Wiseman
*@version - 1
****************************/
//Date 1/22/07
//Lab 04
//Section 1

public class IO_wisemabd_Rooter
{

	 /*************************
	 *This method gets the value
	 *and returns the square root
	 ***************************/
    public static void main(String[] args)
    {
       double          value, result; //holds the numbers used      
       PrintWriter     screen;        //used to print output
       Scanner         keyboard;		  //the scanner
       
       screen   = new PrintWriter(System.out);       
       keyboard = new Scanner(System.in);
		 
		 
       screen.println("Enter a number: ");    
       screen.flush();
		 
       //this receives the number and prints out it's square root
       while (keyboard.hasNext())
       {
		 	 
          value = keyboard.nextDouble();
          result = Math.sqrt(value);

          screen.printf("The square root of " + value + " is " + result);
          screen.flush();
          
          screen.println("Enter a number: ");       
        	 screen.flush();
       }

       screen.println("Done.\n");       
       screen.flush();
    }
    
}
