Runaway
2012-08-23 15:54:53
Why do both of these output the same result? I can't seem to figure out the logic behind it!
program new;
var
Tally: array[0..1] of array[0..1] of Integer;
i: Integer;
begin
for i := 0 to 99 do
begin
Inc(Tally[0][Random(0)]);
Inc(Tally[1][Random(1)]);
end;
Writeln(Tally[0]);
Writeln(Tally[1]);
end.
Compiled successfully in 31 ms.
[100, 0]
[100, 0]
Successfully executed.