Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
procedure TForm1.Button1Click(Sender: TObject);
var
loop: Integer;
begin
Randomize; // seed the random number generator
for loop := 1 to 10 do begin
Canvas.TextOut(100,100+(loop*30),InttoStr(Random(20)));
end;
end;
procedure TForm1.Button2Click(Sender: TObject);
var
nums : array[1..100] of integer;
loop : integer;
place1 : integer;
place2 : integer;
tmp1 : integer;
begin
Randomize;
for loop := 1 to 100 do
begin
nums[loop] := loop;
end;
for loop := 1 to 1000 do
begin
place1 := (Random(100)+1);
place2 := (Random(100)+1);
tmp1 := nums[place1];
nums[place1] := nums[place2];
nums[place2] := tmp1;
end;
for loop := 1 to 10 do begin
Canvas.TextOut(100,100+(loop*30),InttoStr(nums[loop]));
end;
end;