This should do the trick :
public static double avgValue(int[] nums) int sum = 0; for (int value : nums) { sum += value; } return sum / nums.length; }
1.4m articles
1.4m replys
5 comments
56.9k users