Advertisement
Guest User

Untitled

a guest
Jun 25th, 2019
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. #include <cmath>
  4.  
  5. #include <iomanip>
  6.  
  7. using namespace std;
  8.  
  9. long long n, num, s, i;
  10.  
  11. float m;
  12.  
  13. int main()
  14.  
  15. {
  16.  
  17.   cin >> n;
  18.  
  19.   for (i=1; i<=n; ++i)
  20.  
  21.   {
  22.  
  23.       cin >> num;
  24.  
  25.       s=s+num*num;
  26.  
  27.   }
  28.  
  29.   m=sqrt((float)s/n);
  30.  
  31.    
  32.  
  33.   cout <<  fixed << setprecision(2) <<  m;
  34.  
  35. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement