#include
main()
{
float a,b,c,disc,x1,x2,p,q;
scanf("a=%f,b=%f,c=%f",&a,&b,&c);
disc=b*b-4*a*c;
p=-b/(2*a);
q=sqrt(disc)/(2*a);
x1=p+q;x2=p-q;
printf("\n\nx1=%5.2f\nx2=%5.2f\n",x1,x2);
}
undefined reference to 'sqrt'
collect2:id returned 1 exit status
可丘沙 于 2006-05-31 17:19:39发表:
缺少头文件