Skip to content

Instantly share code, notes, and snippets.

@parzibyte
Created January 16, 2021 01:37
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/f238f5bff48b13a5a35eda57a1d186eb to your computer and use it in GitHub Desktop.
Save parzibyte/f238f5bff48b13a5a35eda57a1d186eb to your computer and use it in GitHub Desktop.
// Ahora vamos a hacer cálculos
// La sumatoria para promediar
double sumatoria = 0;
// Recorrer notas, imprimir y sumar a la sumatoria
for (int i = 0; i < cantidadNotas; i++)
{
sumatoria = sumatoria + notas[i];
cout << "Nota " << i + 1 << " . Calificación: " << notas[i] << endl;
}
double promedioNotas = sumatoria / cantidadNotas;
// Momento de calcular el promedio final
double promedioFinal = (promedioNotas + calificacionExamenSemestral) / 2;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment