Salutare!
Am o problema cu rezolvarea problemei
multimi pentru multimile 5-10, 4-11, 2-9 imi afiseaza intersectia 2-9, n-am reusit sa gasesc greseala facuta...
Las fragmentul corespunzator.
if n>2 then begin
read(a);
read(b);
read(c);
read(d);
if a<c then
x:=c;
if b<d then
y:=b;
for i:=1 to (n-2) do begin
read(a);
read(b);
if a>x then
x:=a
if b<y then
y:=b
end;
if x>=y then begin
writeln('Intersectia este multimea vida');
readln;
readln;
end
else begin
writeln('Intersectia celor ',n,' multimi este: ',x,',',y);
readln;
readln;
end;
end;