unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, Grids, Buttons;
type
TForm1 = class(TForm)
StringGrid1: TStringGrid;
Label1: TLabel;
BitBtn1: TBitBtn;
procedure FormCreate(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.FormCreate(Sender: TObject);
var
x:array[1..3,1..3] of integer;
i,j:integer;
begin
randomize;
for i:=1 to 3 do
for j:=1 to 3 do
x[i,j]:=random(10);
for i:=0 to 2 do
for j:=0 to 2 do
StringGrid1.Cells[i,j]:=IntToStr(x[i,j]);
end;
end.
Проблема с массивом случайных чисел |