RANDEMO.P is a demo program from the Kyan Pascal 2.x Utilities Disk 2.
It demos how to use some of the random number generation routines.
For more information on random number generations, see this Random Numbers post.
Source Code
PROGRAM RANDOMDEMO(INPUT,OUTPUT);
VAR
I:INTEGER;
#I RANDOMS.I
BEGIN
SEED(3,9,1,2);
FOR I:=1 TO 10 DO
WRITELN(RND,' ',RANDOM(4,25),',',RANDOM_BYTE);
END.
No comments:
Post a Comment