#include <stdio.h> #include <math.h> int main(void) { double a, b, c, D; double x1, x2; a = 0.0000000045; b = 10; c = 1; D = b*b - 4*a*c; if(D >= 0) { x1 = (fabs(b) + sqrt(D)) / (2. * a); x1 = b < 0 ? x1 : -x1; if(D > 0) { x2 = c / (a * x1); printf("%lf, %lf\n", x1, x2); } else { printf("%lf\n", x1); } } return 0; }