title: incompatible type for argument 1
body: <p>I have this program, in C, and I get these errors:</p>
  
  <p>calcularpi.c:37:2: error: incompatible type for argument 1 of 'media'</p>
  
  <p>calcularpi.c:22:8: note: expected 'double *' but argument is of type 'double'</p>
  
  <p>calcularpi.c:38:2: error: incompatible type for argument 1 of 'eam'</p>
  
  <p>calcularpi.c:23:8: note: expected 'double <em>' but argument is of type 'double'</em></p>
  
  <pre><code>double genera_valor(double lim_inf, double rango);
  int dentro_circunferencia(double x, double y);
  double calcula_pi(long int num_puntos);
  double media(double valores[100]);
  double eam(double valores[100]);
  
  int main(void){ 
   srand48(time(NULL)); // Inicializamos semilla
   long int num_puntos = 0; 
   double valores[100];
   int i=0;
   printf("Numero de puntos a generar: ");
   scanf("%ld",&amp;num_puntos);
    while (i&lt;100){
   valores[i] = calcula_pi(num_puntos);
   i++;
   }
   printf("El valor es: \n %lf", media(valores[100]));
   printf("El error es: \n %lf", eam(valores[100]));
  }
  
  
  double media(double valores[100]){
      double suma=0;
      int i;
      for (i=0;i&lt;100;i++)
  {
    suma=suma + valores[i];
  }
  return suma/100;   
  
  
  }
  
  double eam(double valores[100]){
  int i=0;
  double suma=0;
  double errores[100];
    while (i&lt;100)
  {
  errores[i]= fabs(M_PI - (valores[i]));
  suma=suma+ errores[i];
  i++;
  }    
  return suma/100;
  }
  double calcula_pi(long int num_puntos){
      int i=0;
      double min=-1;
      double puntoscircunferencia=0;
      double rango=2;
      double x=0;
      double y=0;
      while (i&lt;num_puntos){
  genera_valor(min, rango);
  x=genera_valor(min,rango);
  y=genera_valor(min,rango);
  if (dentro_circunferencia (x, y)==1){
      puntoscircunferencia++;
  }
  i++;
  }
      return (puntoscircunferencia*4)/num_puntos;
      }
  double media(double valores[100]);
  
  double genera_valor(double lim_inf, double rango){
     rango = 2;
     lim_inf = -1;
     double r=drand48();
  double valor= lim_inf + rango * r;
  return valor;
  }
  
  /* Comprueba si el punto esta dentro de la circunferencia.*/
  int dentro_circunferencia(double x, double y){
      if(y&lt;1-x*x){
          return 1;
      }
      else
          return 0;
          }
  </code></pre>
  
  <p>I'd like to know where is the array or variable problem, so I can finish the application.
  I think the rest is fine.
  Thanks.</p>