#include <stdio.h> #include <math.h> int main() { float a, b, c; while (scanf("%f %f %f", &a, &b, &c) != EOF) { float n; float x1, x2, p; n = (b * b) - (4 * a * c); if (a == 0) { printf("Not quadratic equation\n"); } else if (a != 0 && b != 0 && c != 0) { if (n == 0) { x1 =(-b)/(2*a); x2 = x1; printf("x1=x2=%.2f\n", x1); } else if (n > 0) { x1 = ((-b) - sqrt(n)) / (2 * a); x2 = ((-b) + sqrt(n))/ (2 * a); printf("x1=%.2f;x2=%.2f\n", x1, x2); } else { p = (sqrt(-n)) / (2 * a); x1 = (-b / (2 * a)); x2 = (-b / (2 * a)); printf("x1=%.2f-%.2fi;x2=%.2f+%.2fi\n",x1,p,x2,p); } } else { x1 = 0.00; x2 = x1; printf("x1=x2=%.2f\n", x1); } } return 0; }