主题:help!!!help!!!
.program program3;
var c: array[1..3] of string[200];
s: array[1..10] of integer;
m, n, i: integer;
procedure numara;
var cod: boolean;
i, j, nr: integer;
begin
for j := 1 to n do begin
nr := 0; cod := true;
for i := 1 to m do
if c[i, j] = '1' then begin
if not cod then begin
cod := true; inc(s[nr]); nr := 0;
end
end
else begin
if cod then begin
nr := 1; cod := false;
end
else inc(nr);
end;
if not cod then inc(s[nr]);
end;
end;
begin
readln(m, n);
for i := 1 to m do readln(c[i]);
numara;
for i := 1 to m do
if s[i] <> 0 then write(i, ' ', s[i], ' ');
end.
请问一开始那里for j := 1 to n do begin ,j的值不是0吗?
那么怎么好象不能循环的感觉?