Advertisement
a53

medie_patratica

a53
Mar 11th, 2019
125
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.26 KB | None | 0 0
  1. #include <iostream>
  2. #include <iomanip>
  3. #include <cmath>
  4. using namespace std;
  5.  
  6. int main()
  7. {
  8. int n,x;
  9. double s=0;
  10. cin>>n;
  11. for(int i=1;i<=n;++i)
  12. cin>>x,s+=1.0*x*x;
  13. s=sqrt(s/n);
  14. cout<<fixed<<setprecision(2)<<s;
  15. return 0;
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement