Код:
Procedure TForm1.Button1Click(Sender:TObject);
Type mas=array[1..4,1..4] of Integer;
Var matr:mas;
i:Integer;
j:Integer;
Begin
For i:=1 to 4 do
For j:=1 to 4 do
matr[i,j]:=StrToInt(StringGrid1.Cells[i,j]);
For i:=1 to 4 do
matr[i,i]:=0;
For i:=1 to 4 do
For j:=1 to 4 do
StringGrid1.Cells[i,j]:=IntToStr(matr[i,j]);
End;
Возник вопрос - возможно ли сделать так, чтобы грид заполнялся сам рандомными числами, без участия пользователя, и если да, то как это оформить?