Untitled

Anonymous
plain_text
12/10/2023 7:59 AM
340 B
20
Indexable
#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;
}
Editor is loading...
Leave a Comment