Oh, so your just wanting a variable parameter function? Something like this

Code:
#include <stdio.h>
#include <stdarg.h>
#include <varargs.h>

double MultFunc(int n,...)
{  
  int i;
  double d=0.0,tmp;

  va_list ap;
  va_start(ap,n);
  d=va_arg(ap,double);
  for(i=0;i<(n-1);i++){
    tmp=va_arg(ap,double);
    d*=tmp;
  }
  va_end(ap);
  return d;
}  


int main(void) 
{ 
  double d;

  //first argument tells how many doubles follow
  d=MultFunc(5,21.005,56.12,2.1313,15.1181,7.7); 
  return 0;

}