title: Finding num values, and min/ max values in Java
body: <p>I am struggling with this code. I need to write a program that reads in an arbitrary number of data points from standard input. Then it returns the number of values, the min/max, and average value. I have not made much progress but here is all i have. Thanks in advance for help. </p>
  
  <pre><code>public static void main(String[] args) {
      Scanner input = new Scanner(System.in);
  
      double num,sum=0,min,max;
      max = Integer.MAX_VALUE;
      min = Integer.MIN_VALUE;
      int Date=0;
      while (input.hasNext()) {
           num=input.nextDouble();
              sum+=num;
              Date++;
              if(num&gt;=max)
  
              {
               max=num;
               System.out.println(max);
              }
             if(num&lt;min)
              {
               min=num; 
               System.out.println(min);
              }
      }
  }
  </code></pre>