#include<stdio.h> #include<math.h> void main() { int a,b,c; scanf("%d%d%d",&a,&b,&c); float x=(-b+sqrt(b*b-4*a*c))/2,y=(-b-sqrt(b*b-4*a*c))/2; printf("%.2f %.2f",x,y); }
Double click to view unformatted code.