分类: 信息化
2014-12-15 11:36:21
#include
int equation(double a,double b,double c)
{
if(b*b-4*a*c>0)
{
return 2;
}
else if(b*b-4*a*c>0)
{
return 1;
}
else if(b*b-4*a*c<0)
{
return 0;
}
}
int main()
{
double a,b,c;
scanf("%lf%lf%lf",&a,&b,&c);
printf("%d\n",equation(a,b,c));
return 0;
}