Submission

Status:

PPPPPPPPPP

Subtask/Task Score:

100/100

Score: 100

User: konthaina_TH

Problemset: Find Score

Language: cpp

Time: 0.002 second

Submitted On: 2025-11-07 08:33:30

#include <bits/stdc++.h>
#include <iomanip>
using namespace std;

int main()
{
    int x,cnt = 0;
    float total = 0;
    int high = -10000   ,low = 10000;
    cin >> x;
    for (int i=0;i<x;i++) {
        float a;
        cin >> a;
        if (a > high) high = a;
        if (a < low ) low = a;
        total += a;
        cnt++;
    }
    float avg = total / cnt;
    cout << high << "\n" << low << "\n";
    cout << fixed << setprecision(2);
    cout << avg;
}