定义一个方法接收一个 int 类型的二维数组,返回所有元素平均值int 类型 public static int avg(int[][] arr) { //用来计算总和 int sum = 0; //用来记次数 int count =