#include <iostream>

using namespace std;

int main() {
    int estudiantes;
    double nota, suma = 0;
    
    cout << "Estudiantes: ";
    cin >> estudiantes;
    
    if (estudiantes > 0) {
        for (int i = 1; i <= estudiantes; i++) {
            cout << "Nota " << i << ": ";
            cin >> nota;
            suma += nota;
        }
        
        double promedio = suma / estudiantes;
        cout << "Promedio: " << promedio << endl;
    } else {
        cout << "La cantidad de estudiantes debe ser mayor a 0." << endl;
    }
    
    return 0;
}

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: