program SwapXY;varx, y: integer;
beginx := 5;y := 10;
writeln('Before swapping:');writeln('x = ', x);writeln('y = ', y);
x := x + y;y := x - y;x := x - y;
writeln('After swapping:');writeln('x = ', x);writeln('y = ', y);
end.
program SwapXY;
var
x, y: integer;
begin
x := 5;
y := 10;
writeln('Before swapping:');
writeln('x = ', x);
writeln('y = ', y);
x := x + y;
y := x - y;
x := x - y;
writeln('After swapping:');
writeln('x = ', x);
writeln('y = ', y);
end.