import java.io.*;
import java.util.*;
/**********************************************************************
 * This class deals with reading in a number and performing certain tasks
 * using that number.
 * 
 * @author  Justin Cruz
 * @version V1
 **********************************************************************
 * Name: Justin Cruz
 * Date: 1-22-07
 * Lab #: 4
 * Section: 1
 *********************************************************************/
public class IO_cruzja_Rooter
{
	/****************************************************************
   * This main method will be used to read in a number and then print
	* the square root of that number.
   *
   * @param args Command line arguments, ignored
   *****************************************************************/
    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();
       
       
       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();
    }
    
}
