Răspuns:
#include <iostream>
#include <cmath>
using namespace std;
int main()
{
double p=1.0, mg;
int a, i, nr=0;
for (i=1; i<=20; i++) {
cin >> a;
if (a%2==1) {
p*=a;
++nr;
}
}
cout << p << " " << nr << endl;
mg=pow(p, 1.0/nr);
cout << mg;
return 0;
}
Explicație: