import java.io.PrintWriter;
import java.util.Scanner;
/***********************************************
 * Description
 *
 * @author - Modified by Tim Ward
 * @version - V1 - 1/22/07
 ************************************************/
 /*
 /  References and Ackknowledgements: I have recieved
 /  no help on this programming assignment
 /
 /***********************************************/
 // Tim Ward
 // Section 3
 // 1/22/07
 // Lab 4

public class IO_wardtm_Rooter
{
    public static void main(String[] args)
    {
       double          value, result;       
       PrintWriter     screen;       
       Scanner         keyboard;
       
       screen   = new PrintWriter(System.out);       
       keyboard = new Scanner(System.in);
       
		 //ask user to input a number
       screen.println("Enter a number: ");    
		 screen.flush();
       
       while (keyboard.hasNext())
       {
		    //output the square root of the input
          value = keyboard.nextDouble();
          result = Math.sqrt(value);

          screen.printf("The square root of " + value + " is " + result);
          screen.flush();
          
			 //ask the user to input another number
          screen.println("Enter a number: ");       
        	 screen.flush();
       }
       
		 //output that the program has ended normally
       screen.println("Done.\n");       
       screen.flush();
    } //end main
    
} //end Rooter
