![]() |
|
|
#8
|
||||
|
||||
|
1. Непонятно чему равно n на входе в TForm1.Button2Click
2. Нафига делать два цикла на заполнение a и b если это можно сделать одним: Код:
for i:=0 to n-1
do for j:=0 to n-1
do begin
a[i,j]:=StrToInt(StringGrid1.Cells[j,i]);
b[i,j]:=StrToInt(StringGrid2.Cells[j,i]);
end;Код:
if l=true then Код:
if l then Код:
for i:=0 to n-1
do begin
l:=true;
for j:=0 to n-1
do if (a[i,j]>=0) and (b[i,j]>=0)
then begin
l:=false;
break;
end;
if l then x[i]:=1 else x[i]:=0 ;
end;Последний раз редактировалось Страдалецъ, 14.12.2009 в 23:28. |