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