(Gast)
n/a Beiträge
|
Re: Zufalsgenerator - Zahlen auslassen ?
20. Okt 2004, 11:06
Oh... so stimmts:
Delphi-Quellcode:
var Used: array[1..10] of Integer; i, x, t: Integer;
begin
Randomize;
i := 1;
FillChar(Used[1], 10*sizeof(Uses[1]), 0);
while i <> 11 do
begin
t := Random(10)+1;
for x := 1 to i do
if Used[x] = t then Break;
if x = i+1 then
begin
Used[i] := t;
Inc(i);
end;
end;
end;
|
|
Zitat
|