Answer the question
In order to leave comments, you need to log in
Program1.pas(16): 'else' encountered and statement expected?
begin
readln(a, b, c) ;
D:=sqr(b) - 4*a*c;
writeln('D= ', D);
if D=0 then
begin
x:= -b/2*a;
writeln('x= ', x:8:3);
end;
if D>0 then
begin
x1:= -b+sqrt(D)/2*a;
x2:= -b-sqrt(D)/2*a;
writeln('x1= ', x1:8:3, 'x2= ', x2:8:3) ;
end;
else writeln('Корней нету!');
end.
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question