![]() |
|
#1
|
|||
|
|||
![]() Код:
procedure TForm1.Button2Click(Sender: TObject); Type Tmas=array[0..14] of integer; Var a,b:array[0..14] of Tmas; x:array[0..14] of integer; l:boolean; i,j:integer; begin for i:=0 to n-1 do for j:=0 to n-1 do a[i,j]:=StrToInt(StringGrid1.Cells[j,i]); for i:=0 to n-1 do for j:=0 to n-1 do b[i,j]:=StrToInt(StringGrid2.Cells[j,i]); for i:=1 to n do begin l:=true; for j:=1 to n do if (a[i,j]>=0) and (b[i,j]>=0) then l:=false; if l=true then x[i]:=1 else x[i]:=0 ; end; for i:= 1 to n do memo1.Lines.Add(inttostr(x[i])); end; обьясните почему в обоих случаях одномерный масив x[i]:=0 ???? реально замахался ![]() Последний раз редактировалось Admin, 14.12.2009 в 20:35. |