Pascal
program korni;
uses crt;
var a, b, c, x1, x2,d: real;
begin
write('vvedite koeffecienti uravnenia');
readln(a,b,c);
d:=sqr(b)-4*a*c;
if d>0 then
x1:=((-b)+sqrt(d))/(2*a);
x2:=((-b)-sqrt(d))/(2*a);
write('x1 = ',x1,'x2 = ',x2);
end;
if d<0 then write('kornei net')
else
x1:=((-b)/(2*a);
write('x = ',x1);
readln;
end.
program name;
var
вводишь a,b,c
потом отдельно х
if (a*x*x+b*x+c=0) and (a<>0) then
d;=sqr(b)-4a*c;
if d<0 then begin
writeln('kornyey net');
Pascal
program korni;
uses crt;
var a, b, c, x1, x2,d: real;
begin
write('vvedite koeffecienti uravnenia');
readln(a,b,c);
d:=sqr(b)-4*a*c;
if d>0 then
begin
x1:=((-b)+sqrt(d))/(2*a);
x2:=((-b)-sqrt(d))/(2*a);
write('x1 = ',x1,'x2 = ',x2);
end;
if d<0 then write('kornei net')
else
begin
x1:=((-b)/(2*a);
write('x = ',x1);
end;
readln;
end.
program name;
var
begin
вводишь a,b,c
потом отдельно х
if (a*x*x+b*x+c=0) and (a<>0) then
begin
d;=sqr(b)-4a*c;
end;
if d<0 then begin
writeln('kornyey net');