Program procedura;
var a,b,c:real;
xr1,xr2,xi1,xi2:real;
PROCEDURE kravenka ([B]a,b,c[/B]:real; var [B]xr1,xr2,xi1,xi2[/B]:real);
var d:real;
begin
d:=b*b-4*a*c;
if d<0 then begin
xr1:=-b/(2*a);
xr2:=xr1;
xi1:=sqrt(-d)/(2*a);
xi2:=-xi1;
end
else begin
xi1:=0;
xi2:=0;
xr1:=(-b+sqrt(d))/(2*a);
xr2:=(-b-sqrt(d))/(2*a);
end;
end;
begin
writeln ('vnesete gi koeficientite na kvadratna ravenka a, b i c');
readln (a,b,c);
kravenka(a,b,c,xr1,xr2,xi1,xi2);
writeln ('Prviot realen broj e ',xr1:2:2);
writeln ('Vtoriot realen broj e ',xr2:2:2);
writeln ('Kompleksniot broj e ',xi1:2:2,'i');
writeln ('Imaginarniot broj e ',xi1:2:2);
end.