title: Java output the number of scores above or equal to the average
body: <p>So I have class assignment where I have to let users type values into an array, get the average and output the number of scores above or equal to the average, and the number of scores below the average.</p>
  
  <p>However, I only figured out average part.</p>
  
  <p>Here is what I have so far:</p>
  
  <pre><code>public static void main(String[] args) {
  
      Scanner sc = new Scanner(System.in);
      System.out.println("Enter size of your array: ");
  
      int n = sc.nextInt();
      int a[] = new int[n];
      System.out.println("Enter the test scores");
  
      for(int i = 0; i &lt; a.length; i++) {
          a[i] = sc.nextInt(); 
      }
  
      int sum = 0;
  
      for(int b=0; b &lt; a.length; b++) {
          sum = sum + a[b]; 
      }
  
      double average = ((double)sum) / a.length;
      System.out.println("The average is"+" " + average);
  }
  </code></pre>
  
  <p>I would like to get help on the part where I output the number of scores that is above or equal to the average and number of scores below the average.</p>