#include <iostream>
using namespace std;
int main() {
    int n;
    cout<<"Ingrese la dimension del vector => ";
    cin>> n;
    int* a = new int[n];
    float suma = 0;
    for (int i=0; i < n; i++)
    {
        cout <<"Ingrese la nota N "<<i+1<< "\t";
        cin>> a[i];
    }
    for(int i =0; i < n; i++)
    {
        suma = suma + a[i];
    }
    cout<<"\nel promedio es de "<<suma/5;
    return 0;
}

Embed on website

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