import java.util.Scanner;
import java.io.*;
/*************************************************************
	* This program will prompt for a number, and then print the 
	* square root of that number
	*
	* @author-Mike Ellis
	* @Version- V1 1/22/07
		**************************************************************
		* References and Acknowledgements- I Recieved no outside help with this Program
		**************************************************************/
	// Mike Ellis
	// 2:30 Lab
	// 1/22/07
	// Section-3


public class IO_ellisms_Rooter
{
	 
    public static void main(String[] args)
    {
       double          value, result;       
       PrintWriter     screen;       
       Scanner         keyboard;
       
       screen   = new PrintWriter(System.out);       
       keyboard = new Scanner(System.in);

       screen.println("Enter a number: ");    
       screen.flush();

       /*prints the square root of the number entered. 
		 This will continue until no number is entered*/
       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();
    }
    
}
