Ad

Input an int array and returns the average of the numbers in it.

public class Average {
   public static int averageFinder(int[] arr) {
      int total = 0;
      for(int num: arr){
         total += num;
      }
      int result = total / arr.length;
      return result;
   }
}