Đây có lẽ là bài viết cuối cùng về chủ đề Pascal của mình. Pascal thực sự đã lỗi thời và không còn được dùng nhiều ngày này nữa. Mình viết những chương trình để giải trí là chính.
program tt3;
uses crt,Graph ;
var i,x,y,y2,x2:integer;
x1,y1: array [1..500] of integer;
begin
initGraph(detect(),0,'');
x := -100;
y := 500;
x2 := -100-900;
y2 := 500 + 900;
for i := 1 to 500 do
begin
x1[i] := Random(getMaxX());
y1[i] := Random(getMaxY());
end;
setTextStyle(0,0,10);
repeat
for i := 1 to 500 do
putPixel(x1[i],y1[i],Yellow);
outTextXY(x + 100,y + 100,'💖');
outTextXY(x - 200,y + 300,'💖');
outTextXY(x - 500,y - 500,'💖');
outTextXY(x - 300,y + 800,'💖');
outTextXY(x ,y + 500,'💖');
outTextXY(x ,y + 900,'💖');
outTextXY(x2,y2,'I ❤ YOU');
outTextXY(x - 950,y + 1100,'💖');
outTextXY(x - 1000,y + 1200,'💖');
x := x + 50;
y := y - 50;
x2 := x2 + 50;
y2 := y2 - 50;
delay(500);
clearDevice();
until x2 = 100;
for i := 1 to 500 do
putPixel(x1[i],y1[i],Yellow);
outTextXY(x2,y2,'I ❤ YOU');
end.