SHARE
TWEET

Untitled

a guest Jun 25th, 2019 69 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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. }
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
 
Top