#include <stdlib.h>#include <iostream>#include <iomanip>using namespace std;int main() {const int n = 3;const int m = 4;int a[n][m];int b[n*m];int k;double sr;cout << "Исходный массив" <<endl;srand(time(0));for (int i = 0; i < n; i++){ for (int j = 0; j < m; j++){ a[i][j]=10+(51.0 / RAND_MAX) * rand(); cout << fixed << setw (7) << a[i][j]; }cout <<endl;}sr=0;for (int i = 0; i < n; i++) for (int j = 0; j < m; j++) sr=sr+a[i][j];sr = sr/(n*m); k = -1;cout << "sr = " << sr << endl;for (int i = 0; i < n; i++) for (int j = 0; j < m; j++) if (a[i][j]<sr) { k++; b[k]=a[i][j]; }cout << "Полученный массив" <<endl;for (int i = 0; i <= k; i++){ cout << fixed << setw (7) << b[i];}cout <<endl;}Пример:Исходный массив 31 60 58 40 41 46 29 46 53 38 47 42 sr = 44.250000 Полученный массив 31 40 41 29 38 42