Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>#include <iomanip>#include <cmath>using namespace std;
- 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;
- } mg=pow(p,1.0/n); cout <<fixed<<setprecision(2)<<mg;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement