SHARE
TWEET

Untitled

a guest Aug 21st, 2019 68 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top