Académique Documents
Professionnel Documents
Culture Documents
int suma = 0;
int contador = 0;
for (int i = 0; i <= getFilas() - 1; i++) {
for (int j = 0; j <= getColumnas() - 1; j++) {
if (getMatriz(i, j) % 2 == 0) {
contador ++;
suma = suma + getMatriz(i, j);
}
}
}
return (suma / contador);
}
}
}
return suma;
}
}
}
return suma/(getColumnas()*getFilas());
}
}
return suma;
}
}