uses crt;
var
a, b, c, x1, x2, x3, x4, t, t1, t2, d: real;
begin
clrscr;
write('a=');
readln(a);
write('b=');
readln(b);
write('c=');
readln(c);
d := (b * b - 4 * a * c);
if d < 0 then
begin
writeln('net resheniy');
readln;
exit;
end
else if d = 0 then
begin
t := -b / (2 * a);
if t < 0 then
begin
writeln('net resheniy');
readln;
exit;
end
else if t = 0 then
begin
writeln('resh ur x1=x2=x3=x4=0');
readln;
exit;
end
else if t > 0 then
begin
writeln('x1=x2=', sqrt(t):5:2, ' x3=x4=', -sqrt(t):5:2);
readln;
exit;
end;
end
else if d > 0 then
begin
t1 := (-b + sqrt(d)) / (2 * a);
t2 := (-b - sqrt(d)) / (2 * a);
if (t1 > 0) and (t2 < 0) then
begin
writeln('x1=', sqrt(t1):5:2, ' x2=', -sqrt(t1):5:2);
readln;
exit;
end
else if (t1 < 0) and (t2 > 0) then
begin
writeln('x1=', sqrt(t2):5:2, ' x2=', -sqrt(t2));
readln;
exit;
end
else if (t2 > 0) and (t1 > 0) then
begin
writeln('x1=', sqrt(t1):5:2, ' x2=', -sqrt(t1):5:2, ' x3=', sqrt(t2):5:2,
' x4=', -sqrt(t2):5:2);
readln;
exit;
end;
end;
end.