Advertisement
Guest User

Untitled

a guest
Oct 14th, 2019
107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.22 KB | None | 0 0
  1. int count(double vect[], int n)
  2. {
  3. double ma = 0;
  4. for(int i = 0; i<n; ++i)
  5. ma+=vect[i];
  6. ma/=n;
  7.  
  8. int c = 0;
  9. for(int i = 0; i<n; ++i){
  10. if(vect[i]>=ma) ++c;
  11. }
  12. return c;
  13. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement