提交时间:2024-11-10 11:32:03

运行 ID: 56294

#include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; double sum = 0.0; for (int i = 0; i < n; i++) { double num; cin >> num; sum += num; } double average = sum / n; cout<<fixed<<setprecision(4)<<average; return 0; }