   import java.io.*;
   import java.util.*;
/*============================================================== 
 * This class simply asks for a number infinitely.
 *
 * @author Jared Gerhart
 * @version 1
 * 
//==============================================================*/
// Date: 1/22/07
// Section 3
// Lab 4
    public class IO_gerharjm_Rooter
   {
       /*========================================================
       * 
       *  main method - required for the program to operate
       *
       *  @param args   command line arguments not used in this application
       */
       public static void main(String[] args)
      {
         double          value, result;       
         PrintWriter     screen;       
         Scanner         keyboard;
       
         screen   = new PrintWriter(System.out);       
         keyboard = new Scanner(System.in);


	      // Request for input
         screen.println("Enter a number: ");    
			screen.flush();       
       	
         while (keyboard.hasNext())
         {
            value = keyboard.nextDouble();
            result = Math.sqrt(value);
         	
				// This block writes to the screen and then flushes the stream
            screen.printf("The square root of " + value + " is " + result);
            screen.flush();
          
            screen.println("Enter a number: ");       
            screen.flush();
         }
      
         screen.println("Done.\n");       
         screen.flush();
      }
    
   }
