daily pastebin goal
63%
SHARE
TWEET

Untitled

a guest Jan 22nd, 2019 52 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <iostream>
  2. #include <cmath>
  3.  
  4. using namespace std;
  5.  
  6. float srednia_liczb(int a){
  7.     int liczba, suma=0;
  8.     for(int i=0; i<a; i++){
  9.         cin>>liczba;
  10.         suma+=liczba;
  11.     }
  12.  
  13.     return (float)suma/a;
  14. }
  15.  
  16. int main()
  17. {
  18.     int a;
  19.     cin>>a;
  20.     cout<<srednia_liczb(a)<<endl;
  21.  
  22.     return 0;
  23. }
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