提交时间:2024-09-22 21:55:58
运行 ID: 51613
#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; }