Advertisement
Guest User

Untitled

a guest
Aug 21st, 2019
87
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>
  2. #include <iomanip>
  3. #include <math.h>
  4. using namespace std;
  5. int main() {
  6. int n,x,y,i;
  7. float p=1, mg=1;
  8. do {
  9. cin>>n;
  10. } while ((n<=1)&&(n>10));
  11. for (i=1; i<=n; i++) {
  12. cin>>x;
  13. p=p*x;
  14. }
  15. mg=pow(p,1.0/n);
  16. cout <<fixed<<setprecision(2)<<mg;
  17. return 0;
  18. }
  19.  
  20. Citește mai multe pe Brainly.ro - https://brainly.ro/tema/4801997#readmore
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement