Advertisement
wrench786

Lab task - (array - 4)

Sep 29th, 2021
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.56 KB | None | 0 0
  1. #include <bits/stdc++.h>
  2.  
  3. #define ll long long
  4. #define ull unsigned long long
  5. #define uom unordered_map
  6. #define pb push_back
  7. #define yes cout<<"YES\n"
  8. #define no cout<<"NO\n"
  9.  
  10. #define dot(x) fixed<<setprecision(x)
  11. #define wrench786 ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0);
  12.  
  13. #define PI (acos(-1.0))
  14. #define eps 0.00001
  15. const int LIMIT = 10000*10;
  16. using namespace std;
  17.  
  18. int main(){
  19. int n,sum=0;
  20. cin>>n;
  21. int arr[n];
  22. for(int i=0;i<n;i++){
  23. cin>>arr[i];
  24. sum+=arr[i];
  25. }
  26.  
  27. cout<<(double)sum/n<<endl;
  28. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement