SHARE
TWEET

Untitled

a guest May 15th, 2019 66 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include<stdio.h>
  2.  
  3. double mean(int vector[]){
  4.    
  5.     int sum = 0;
  6.     for (int i = 0; i < 6; ++i)
  7.     {
  8.         sum = sum + vector[i];
  9.     }
  10.    
  11.     double result = (sum / 6.0);
  12.     printf("%f\n", result);
  13.     return result;
  14.  
  15. }
  16.  
  17. int main(int argc, char const *argv[])
  18. {
  19.     int v[6] = {1, 2, 3, 4, 5, 6};
  20.     double x = mean(v);
  21.     return 0;
  22. }
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