#include <stdio.h> #include<stdlib.h> #include<math.h> #include<string.h> int main(){ double a,b,c; double x1,x2; scanf("%lf %lf %lf",&a,&b,&c); double d = sqrt(b*b-4*a*c); x1 = (-b+d)/2*a; x2 = (-b-d)/2*a; printf("%.2lf %.2lf",x1,x2); } |
Double click to view unformatted code.