#include <iostream>
#include <time.h>
#include <iomanip>
using namespace std;
int main()
{
int i, j, n, m;
double** a;
double p;
setlocale(LC_ALL, "Russian");
cout << "\nN = ";
cin >> n;
cout << "\nM = ";
cin >> m;
a = new double*[n];
for (i = 0; i < n; i++)
a[i] = new double[m];
srand(time(NULL));
for (i = 0; i < n; i++) {
for (j = 0; j < m; j++) {
a[i][j] = (double)rand() / (RAND_MAX + 1) * 10;
cout << setw (5) << fixed << setprecision (2) << a[i][j] << " ";
}
cout << "\n";
cout << "\nПроизведения строк:";
p = 1;
p *= a[i][j];
cout << setw (15) << fixed << setprecision(2) << right << "\n" << p;
#include <iostream>
#include <time.h>
#include <iomanip>
using namespace std;
int main()
{
int i, j, n, m;
double** a;
double p;
setlocale(LC_ALL, "Russian");
cout << "\nN = ";
cin >> n;
cout << "\nM = ";
cin >> m;
a = new double*[n];
for (i = 0; i < n; i++)
a[i] = new double[m];
srand(time(NULL));
for (i = 0; i < n; i++) {
for (j = 0; j < m; j++) {
a[i][j] = (double)rand() / (RAND_MAX + 1) * 10;
cout << setw (5) << fixed << setprecision (2) << a[i][j] << " ";
}
cout << "\n";
}
cout << "\nПроизведения строк:";
for (i = 0; i < n; i++) {
p = 1;
for (j = 0; j < m; j++) {
p *= a[i][j];
}
cout << setw (15) << fixed << setprecision(2) << right << "\n" << p;
}
cout << "\n";
}