Skip to content

Instantly share code, notes, and snippets.

@RhoKratos
Created October 15, 2017 05:21
Show Gist options
  • Save RhoKratos/de6d856146a9874bb4c5ee4d50a522da to your computer and use it in GitHub Desktop.
Save RhoKratos/de6d856146a9874bb4c5ee4d50a522da to your computer and use it in GitHub Desktop.
Suma de arreglo de 10 números (Básico)
# include <stdio.h>
# include <iostream.h>
int main()
{
int numeros[10] = {10, -5, 3, -10, 13, -19, 20, -12, 7, -8};
int suma = 0;
for (int i = 0; i < 10; i++)
suma += numeros [i];
printf ("la sumatoria es igual a:\t %d", suma);
char c;
c = getchar();
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment