Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <iomanip>
- using namespace std;
- int main()
- {
- int n;
- int sum = 0;
- cin >> n;
- for (int i = 0; i < n; i++)
- {
- int k;
- cin >> k;
- sum += k;
- }
- setprecision(6);
- cout << fixed<< sum / (double) n << endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment