
14.12.2009, 20:31
|
Прохожий
|
|
Регистрация: 25.11.2009
Сообщения: 6
Репутация: 10
|
|
хелп
Код:
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;
Admin: Не забываем про теги!
обьясните почему в обоих случаях одномерный масив x[i]:=0 ????
реально замахался 
|