When i’m running the code it says that there’s an syntax error and it marks me the else: Fatal: Syntax Error, ;expected but ELSE found.(btw this is just one part from my program) can anyone tell me what am i doing wrong?
If D>0 then
begin
x1:=(-b)+sqrt(D)/(2*a);
x2:=(-b)-sqrt(D)/(2*a);
Writeln(x1,x2);
else
if D=0 then
begin
x:=(-b)/(2*a);
Writeln(x);
end;
try