#include
#include
int main()
{
int max(int a,int b,int c);
int mid(int a,int b,int c);
int min(int a,int b,int c);
int a,b,c;
scanf("%d %d %d",&a,&b,&c);
if((b*b-4*a*c)>0)
{
max(a,b,c);
}
else if((b*b-4*a*c)==0)
{
mid(a,b,c);
}
else
{
k=min(a,b,c);
printf("%f",k);
}
}
int max(int a,int b,int c)
{
double x1,x2;
x1=(-b+sqrt(b*b-4*a*c))/2*a;
x2=(-b-sqrt(b*b-4*a*c))/2*a;
printf("%f,%f",x1,x2);
}
int mid(int a,int b,int c)
{
double y;
y=-b/2*a;
printf("%f",y);
}
int min(int a,int b,int c)
{
return 0;
}
2021-07-25 20:03:15
133KB
一年级
1