分类: C/C++
2014-12-16 16:36:21
#include
int jiefangcheng(double a,double b,double c)
{
if(b*b-4*a*c<0)
{
return 0;
}
else if(b*b-4*a*c==0)
{
return 1;
}
else if(b*b-4*a*c>0)
{
return 2;
}
}
int main()
{
double a,b,c;
scanf("%lf%lf%lf",&a,&b,&c);
printf("%d\n" ,jiefangcheng(a,b,c));
return 0;
}