import java.io.PrintWriter;
import java.util.Scanner;
/***********************************************
* @author - Matthew Bernardo 
* @version - V1 - January 22, 2007
* Lab 4
* Section 1
************************************************/
/*
/ References and Ackknowledgements: I have recieved 
/ no help on this programming assignment
/
/***********************************************/


public class IO_bernarmj_Rooter
{
    public static void main(String[] args)
    {
       double          value; //number recieved from the user
		 double          result; //the square root of the value      
       PrintWriter     screen;       
       Scanner         keyboard;
       
       screen   = new PrintWriter(System.out);       
       keyboard = new Scanner(System.in);

       screen.println("Enter a number: ");    
         screen.flush();
       
       while (keyboard.hasNext())  //while loop
       {
          value = keyboard.nextDouble(); //getting the value
          result = Math.sqrt(value);   //getting the root of the value

          screen.printf("The square root of " + value + " is " + result + "\n");
          screen.flush();
          
          screen.println("Enter a number: ");       
        	 screen.flush();
       }

       screen.println("Done.\n");       
       screen.flush();
    }
    
}
