Program giai_phuong_trinh_bac_2;
Uses crt;
Var a,b,c,x1,x2,x,DT:Real;
BEGIN
CLRSCR;
Write('a= '); Readln(a);
Write('b= '); Readln(b);
Write('c= '); Readln(c);
DT:=b*b - 4*a*c;
If DT>0 then
Begin
Writeln('Phuong trinh co 2 nghiem phan biet la');
x1:= (-b+SQRT(DT))/(2*a);
x2:= (-b-SQRT(DT))/(2*a);
Writeln('x1= ', x1:8:2);
Writeln('x2= ', x2:8:2);
End
Else
If DT=0 Then
Begin
Writeln('Phương trinh co 1 nghiem kep la');
x:=(-b/(2*a));
Writeln('x= ', x:8:2);
End
Else
Writeln(' Phương trinh vo nghiem');
Readln;
END.