import java.io.*;
import java.util.Scanner;
/***********************************************
 * takes the sqrt of a given number
 *
 * @author -Jason Crownover
 * @version - V1
 ************************************************/
 //Section3
 //1/22/07
 //File IO

public class IO_crownojd_Rooter
{
	/** 
	 *  takes the sqrt of a given number
	 *
	 * @param args unused
	 */
	 
    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: ");// prints line to buffer 
		 screen.flush();   // prints line to screen
       
       
       while (keyboard.hasNext())// loops as long as it as input in the buffer
       {
          value = keyboard.nextDouble();
          result = Math.sqrt(value);// takes the sqrt of given 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();
    }
    
}
