Chương trình tỏ tình 2 | Đồ họa Pascal #4

Code:

program manyhearts;
uses crt,graph;
var x,y,s: Integer;
begin
  Randomize();
  initGraph(detect(),0,'');
  x := 300;
  y := 1000;
  SetTextStyle(0,0,5);
  s := 5;
  repeat
  begin
  outTextXY(x,y,'❤');
  y := y - 10;
  ClearDevice();
  OutTextXY(x,y,'❤');
  Delay(100);
  ClearDevice();
  end;
  until y = 400;
  repeat
  begin
  outTextXY(x,y,'❤');
  setTextStyle(0,0,s);
  s := s + 1;
  ClearDevice();
  OutTextXY(x,y,'❤');
  Delay(500);
  ClearDevice();
  end;
  until s = 9;
  OutTextXY(x,y,'❤');
  OutTextXY(250,450,'I  You');
  readln;
  closeGraph();
end.

Leave a comment

Design a site like this with WordPress.com
Get started