Skip to content

Instantly share code, notes, and snippets.

@parzibyte
Created November 13, 2019 04:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save parzibyte/f3d6c93c1f7421c6e0e80695d58a6f97 to your computer and use it in GitHub Desktop.
Save parzibyte/f3d6c93c1f7421c6e0e80695d58a6f97 to your computer and use it in GitHub Desktop.
// Obtener media
int sumatoria = 0;
for (int x = 0; x < longitud; x++) {
sumatoria += arreglo[x];
}
float media = (float) sumatoria / (float) longitud;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment