|
Randomize is used to start the random generator, so that it is only used at the first initialization, placed after the begin in the main block. It is enough to call it once, eventhough it may be called several times. Random is used to get the random number. Its parameter is the highest possible number that can be generated. Suppose : num:=random(50); It means that num will contain any integer number between 0 to 49. Look at next example :
var
i : byte;
begin
randomize;
for i:=1 to 100 do
write(random(30),' ');
end.
ne mogu sad da ti prevodim, javi ako s ene snadjes,
a inace u racunaru nista nije slucajno, samo tako deluje
|