Advertisement
Guest User

Untitled

a guest
Aug 21st, 2019
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.35 KB | None | 0 0
  1. #include <iostream>#include <iomanip>#include <cmath>using namespace std;
  2. int main(){    int n,x,y,i;    float p=1, mg=1;    do    {        cin>>n;    }    while ((n<=1)&&(n>10));    for (i=1; i<=n; i++)    {           cin>>x;           p=p*x;
  3.     }    mg=pow(p,1.0/n);    cout <<fixed<<setprecision(2)<<mg;
  4. return 0;
  5. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement