public static float readFloat(){
  return scanner.nextFloat();
}

public static float readFloat ( ) { return scanner . nextFloat ( ) ; }
reads the next token from standard input , parses it as a float , and returns the float .
