#include <iostream>
using namespace std;
int main() {
int secciones, estudiantes;
double sumaGeneral = 0;
int totalEstudiantesGlobal = 0;
cout << "Secciones: ";
cin >> secciones;
for (int s = 1; s <= secciones; s++) {
cout << "Estudiantes en seccion " << s << ": ";
cin >> estudiantes;
double sumaSeccion = 0;
int aprobados = 0, reprobados = 0;
for (int e = 1; e <= estudiantes; e++) {
double nota;
cout << "Nota " << e << ": ";
cin >> nota;
sumaSeccion += nota;
if (nota >= 61) {
aprobados++;
} else {
reprobados++;
}
}
double promedioSeccion = sumaSeccion / estudiantes;
sumaGeneral += sumaSeccion;
totalEstudiantesGlobal += estudiantes;
cout << "Seccion " << s << " - Promedio: " << promedioSeccion
<< "; Aprobados: " << aprobados
<< "; Reprobados: " << reprobados << endl;
}
if (totalEstudiantesGlobal > 0) {
cout << "Promedio general: " << (sumaGeneral / totalEstudiantesGlobal) << endl;
}
return 0;
}
To embed this project on your website, copy the following code and paste it into your website's HTML: