Professional Documents
Culture Documents
ST File
ST File
h>
#include<math.h>
void main()
int x,y,z,d;
float x1,x2;
scanf("%d%d%d",&x,&y,&z);
d=y*y - 4*x*z;
if(d==0)
x1 = -y/(2.0*x);
x2 = x1;
printf("%f",x1);
printf("%f",x2);
else if(d>0)
x1 = (-y+sqrt(d))/(2*x);
x2 = (-y-sqrt(d))/(2*x);
else
getch();