procedure TForm1.Button1Click(Sender: TObject);
var
a,b,i,j,c,r:integer;
Arr : array of array of integer;
begin
a:=strtoint(edit1.text);
b:=strtoint(edit2.text);
setlength(Arr,a,b) ;
randomize;
StringGrid1.ColCount:=a;
StringGrid1.RowCount:=b ;
for i:=0 to a-1 do
begin
for j:=0 to b-1 do
begin
Arr[i,j]:=random(100) ;
end;
end;
for c := 0 to StringGrid1.ColCount - 1 do
for r := 0 to StringGrid1.RowCount - 1 do
StringGrid1.Cells[c,r] := inttostr(Arr[i,j]);
end;
var
a,b,i,j,c,r:integer;
Arr : array of array of integer;
begin
a:=strtoint(edit1.text);
b:=strtoint(edit2.text);
setlength(Arr,a,b) ;
randomize;
StringGrid1.ColCount:=a;
StringGrid1.RowCount:=b ;
for i:=0 to a-1 do
begin
for j:=0 to b-1 do
begin
Arr[i,j]:=random(100) ;
end;
end;
for c := 0 to StringGrid1.ColCount - 1 do
for r := 0 to StringGrid1.RowCount - 1 do
StringGrid1.Cells[c,r] := inttostr(Arr[i,j]);
end;
