int SolveP3(double *x,double a,double b,double c); Here x is an array of size 3. In the case of three real roots function returns the number 3, the roots themselves back in x[0],x[1],x[2]. Remark 1.