Untitled

mail@pastecode.io avatar
unknown
plain_text
7 months ago
269 B
0
Indexable
Never
#include <iostream>
using namespace std;
int main()
{
    int  y, sum = 0, t = 0;
    float w = 0;
    cin >> y;
    int N[100];
    for (int i = 0; i < y; i++) {
        cin >> N[i];
        sum += N[i];
        w = (float)sum / y;
    }
    cout << w;
}
Leave a Comment