Var a,b,c,d:double; Begin write('a = '); read(a); write('b = '); read(b); write('c = '); read(c); d:=sqrt(b*b-4*a*c); if d > 0 then begin writeln('x1 = ', (-b+d)/(2*a)); writeln('x2 = ', (-b-d)/(2*a)); end else if d = 0 then writeln('x = ', -b/(2*a)) else write('Решений нет'); End.
x1=-b+√D/2a
x2= b+√D/2a
a,b,c,d:double;
Begin
write('a = ');
read(a);
write('b = ');
read(b);
write('c = ');
read(c);
d:=sqrt(b*b-4*a*c);
if d > 0 then begin
writeln('x1 = ', (-b+d)/(2*a));
writeln('x2 = ', (-b-d)/(2*a));
end
else
if d = 0 then
writeln('x = ', -b/(2*a))
else
write('Решений нет');
End.