Program kv;Var a,b,c,x1,x2,x,D: Real; BEGIN write ('input a b c =>'); Readln (a,b,c); if a = 0 then if b = 0 then Begin Writeln ('The equation is not compatible'); Readln; Halt End else Begin x :=-c / b; Writeln ('Root x=' ,x:8:2); Readln; Halt End else Begin D :=Sqr (b) - 4 * a * c; if D<0 then Begin Writeln ('The equation has no real roots'); readln; Halt End else Begin x:=-b /( 2 * a ); if D = 0 then Begin Writeln ('Roots are equal x1=x2=', x:8:2); Readln; Halt End; x2:= Sqrt (D)/(2*a); x1:= x2 + x; x2:= x - x2; Writeln('Roots: x1=',x1:8:2, ' x2= ',x2:8:2) EndEnd; Readln;End.
End else Begin x :=-c / b; Writeln ('Root x=' ,x:8:2); Readln; Halt End else Begin D :=Sqr (b) - 4 * a * c; if D<0 then Begin Writeln ('The equation has no real roots');
readln; Halt End else Begin x:=-b /( 2 * a ); if D = 0 then Begin Writeln ('Roots are equal x1=x2=', x:8:2); Readln; Halt End; x2:= Sqrt (D)/(2*a); x1:= x2 + x; x2:= x - x2; Writeln('Roots: x1=',x1:8:2, ' x2= ',x2:8:2) EndEnd; Readln;End.