I'm trying to fill an array with different numbers from 1000 to 9999.
My problem is that my code is filling the array with the same number. Here is my approach:
repeat
Write('Enter an Integer from 5 to 20: '); Readln(n)
until (n in [5..20]);
for i := 1 to n do
begin
T[i] := Random(9000)+1000; // 1000 to 9999
Randomize
end;
Writeln('___________________________________');
for i := 1 to n do
Write(T[i], ' | ' );
Writeln;
Writeln('___________________________________');