#include<stdio.h>
#include<math.h>
main()
{
float delta,x1,x2,a,b,c;
printf(" gia tri a : \n");
scanf("%f",&a);
printf(" gia tri b : \n");
scanf("%f",&b);
printf(" gia tri c : \n");
scanf("%f",&c);
delta=b*b-4*a*c;
if(a==0)
{
printf(" phuong trinh co nghiem duy nhat X=%f\n",-c/b);
}
else
{
if(delta<0)
{
printf(" phuong trinh vo nghiem ");
}
if(delta==0)
{
printf(" phuong trinh co nghiem kep X1=X2= %f\n",-b/(2*a));
}
if(delta>0)
{
printf(" phuong trinh co hai nghiem phan biet :\n");
printf(" X1=%f\n",(-b-sqrt(delta))/(2*a));
printf(" X2=%f\n",(-b+sqrt(delta))/(2*a));
}
}
}