Untitled

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