Tham khảo:
program gia_tri_tuong_ung;
uses crt;
var x,y,z:integer;
begin
clrscr;
write("Nhap x=");readln(x);
write("Nhap y=");readln(y);
writeln('Hai so nguyen truoc khi hoan doi');
writeln('a=',a);
writeln('b=',b);
z:=x;
x:=y;
y:=z;
writeln('Hai so nguyen sau khi hoan doi');
writeln('a=',a);
writeln('b=',b);
readln;
end.