uses
SysUtils;
var A,B,C :Real; Delta, X1, X2 :Real;
begin repeat writeln ('Podaj wspolczynniki rownania kwadratowego');
write ('Podaj A: '); readln (A);
if (A<>0) then
begin
write ('Podaj B: '); readln (B);
write ('Podaj C: '); readln (C);
Delta := sqr(B)-4*A*C;
if (delta<0) then
writeln ('Rownanie nie ma pierwiastkow')
else if (Delta=0) then
begin
X1 := -b/(2*A);
writeln ('Rownanie ma jeden pierw: ',X1 : 10:5);
end
else begin
X1 := (-B-Sqrt(Delta)/(2*A));
X2 := (-B+Sqrt(Delta)/(2*A));
writeln ('Rowanie ma 2 pierw: ',X1:10:2,' ',X2:10:2);
end; writeln;
end; until (A=0);
readln;
end.
------------------------------------------------------------
Pozdrawiam Dominik G. :)