Skip to content

Instantly share code, notes, and snippets.

@parzibyte
Created October 16, 2019 19:39
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/3e5a0bea8dbffe0feeeca6bf4b242e07 to your computer and use it in GitHub Desktop.
Save parzibyte/3e5a0bea8dbffe0feeeca6bf4b242e07 to your computer and use it in GitHub Desktop.
for (int x = 0; x < longitud; x++) {
int numeroActual = numeros[x];
// Sumar el número actual a la sumatoria
sumatoria = sumatoria + numeroActual;
// También se puede sumar de forma más simple:
// sumatoria += numeroActual;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment