procedure Roots(a, b, c: real; var x1, x2: real;
var fail: boolean);
begin
var D := b * b - 4 * a * c;
if D < 0 then
fail := True
else
begin
fail := False;
D := Sqrt(D);
x1 := (-b - D) / (2 * a);
x2 := (-b + D) / (2 * a);
end
end;
begin
var x1, x2: real;
var fail: boolean;
loop 3 do
begin
var (a, b, c) := ReadReal3('Введи a, b, c:');
Roots(a, b, c, x1, x2, fail);
if fail then
Println('Нет действительных корней')
else if x1 = x2 then
Println('x =', x1)
else
Println('x1 =', x1, ' x2 =', x2)
end
end.