Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <iomanip>
- #include <algorithm>
- #include <cmath>
- using namespace std;
- int main()
- {
- int n, s1;
- cin >> n;
- s1 = 0;
- int a[101];
- for (int i = 0; i < n; i++) {
- cin >> a[i];
- s1 += a[i];
- }
- cout << (double)s1 / n << endl;
- int k, m, s2;
- cin >> k >> m;
- s2 = 0;
- int b[101][101];
- for (int i = 0; i < k; i++) {
- for (int j = 0; j < m; j++) {
- cin >> b[i][j];
- s2 += b[i][j];
- }
- }
- cout << (double)s2 / (k * m);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement