public class Find_while
{
  public static void main(String args[])
  {

    TokenReader in = new TokenReader(System.in);

    double temp = 0;    
    double max  = 0;

    while(temp >= 0) {
      System.out.print("Enter a number: ");
      System.out.flush();
      temp = in.readDouble();

      if (temp >= max)
	max = temp;

    }
    

    System.out.println();
    System.out.println("Maximum value: " + max);

  }
}
