title: how to get an average number from 6 different numbers?
body: <p>I've got 2 arrays, each array contain 6 different double numbers. both arrays are added to get an average from each element. then the 6 average numbers are produced (each element of array A and array B are added and then divided) now i need to add those 6 average numbers that were calculated, and get a result of those average numbers added and divided by 6.( sorry if im confusing people) i dont know how to start it.
  this is my code</p>
  
  <pre><code>public static void main (String [] args)
  {
      double examMarks [] = {50,40,60,80,70,11};
      double courseworkmarks [] = {65,49,58,77,35,40};
      System.out.println ("These are the exam marks and the course work    marks");//First row is the exam marks, second row is the course work marks
      computeMarks (examMarks);
      computeMarks1 (courseworkmarks);
      computeResults(examMarks, courseworkmarks);
  }
  
  public static void computeMarks(double[] examMarks)
  {
      for (int row=0;row&lt;examMarks.length;row++){
          System.out.print (examMarks[row] +"\t");
      }
      System.out.println();
  }
  public static void computeMarks1(double[] courseworkmarks)
  {
      for (int row=0;row&lt;courseworkmarks.length;row++){
          System.out.print (courseworkmarks[row] +"\t");
      }
      System.out.println();
  }
  
  
  public static void computeResults(double[] examMarks, double[] courseworkmarks)
  {
  
          double avgMarks[] =new double[examMarks.length];
          System.out.println ("The total average of each module is ");
          for(int i=0;i&lt;avgMarks.length;i++){
              int cwWeighting=40;
              avgMarks[i]=(examMarks[i]*(100-cwWeighting)+courseworkmarks[i]*cwWeighting)/100;
  
              System.out.print(avgMarks[i] + "\t" );
          }
  }
  </code></pre>
  
  <p>this is what i've tried so far:</p>
  
  <pre><code> public static computeStageMarks()
          {
              double totalMarks;
              totalMarks = (avgMarks [])/6;
              if (totalMarks&lt;35)
              {
                  System.out.println ("Failed" + totalMarks);
              }
              if (totalMarks&gt;=40)
              {
                  System.out.println ("Passed" + totalMarks);
              }
              if (totalMarks==35)
              {
                  System.out.println ("Passed by compensation" + totalMarks);
              }
  </code></pre>
  
  <p>but it wont work. is the == right for this case? also i need it to recognize the avgMark from the last method. how do i do this?</p>