title: how to get the sum, average, minimum and maximum of five numbers-java using do-while loop
body: <p>I'm trying to get the sum, average, minimum and maximum of five numbers but somehow I get this output. I'm trying to re-code it all over again but it is still the same. Can you help me check this guys...
      Here's my code:</p>
  
  <pre><code>import java.util.*;
  
  public class Kleine {
      public static void main(String[] args) {
          Scanner scan = new Scanner(System.in);
          double average;
          int count = 0, sum = 0, num, min = 0, max = 0;
  
          System.out.println("Please enter the number of numbers you wish to evaluate:");
  
          do {
              num = scan.nextInt();
              sum += num;
              count++;
          } while (count &lt; 5);
  
          average = sum / 5;
  
          {
              if (num &gt; max) {
                  max = num;
              }
  
              if (num &lt; min) {
                  min = num;
              }
          }
  
          System.out.println("Your average is: " + average);
          System.out.println("The sum is: " + sum);    
  
          System.out.println("Your maximum number is: " + max);
          System.out.println("Your minimum number is: " + min);
      }
  }
  </code></pre>
  
  <p>Here's the output:</p>
  
  <pre><code>Please enter the number of numbers you wish to evaluate:
  1
  10
  5
  -3
  6
  Your average is3.0
  The sum is:19
  Your maximum number is 6
  Your minimum number is 0
  BUILD SUCCESSFUL (total time: 19 seconds)
  </code></pre>
  
  <p>The minimum and maximum numbers goes somewhere...
  a little advice please...</p>