Код программы:
#include
#include
#include
#include
#include
#include
using namespace std;
int main()
{
setlocale(LC_ALL, "Russian");
double* A, Srg, proizv = 1;
int kol = 0, i, N;
cout
cin >> N;
A = (double*)malloc(N * sizeof(double));
cout
for (i = 0; i < N; i++)
cin >> A[i];
for (i = 0; i < N; i++)
if (A[i] > 0) {
proizv = proizv * A[i];
++kol;
}
Srg = pow(proizv, 1./kol);
cout
for (i = 0; i < N; i++)
cout
cout
cout
A[0] = Srg;
for (i = 0; i < N; i++)
cout
return 0;
}