Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <conio.h>
- #include <string>
- #include <set>
- #include <map>
- #include <algorithm>
- #include <string>
- #include <math.h>
- #include <vector>
- using namespace std;
- int main()
- {
- long long prom;
- double result, sum = 0, n;
- cin >> n;
- cout.setf(ios::fixed);
- cout.precision(6);
- for (int i = 1; i <= n; i++)
- {
- cin >> prom;
- sum = sum + prom;
- }
- result = (sum*2.0) / (n * 2.0);
- cout << result;
- _getch();
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment