#include <stdio.h>
#include <math.h>
double
quadratic (int a, int b, int c, double* xplus)
{
double xminus;
xminus = (-b - sqrt (b * b - 4 * a * c))/ (2 * a);
*xplus = (-b + sqrt (b * b - 4 * a * c))/ (2 * a);
return (xminus);
}
int
main (void)
{
int a = 10, b = 40, c = 30;
double xplus, xminus;
xminus = quadratic (a, b, c, &xplus);
printf ("Using +: %lf\n", xplus);
printf ("Using -: %lf\n", xminus);
return (0);
}