Sunday, May 3, 2020

RANDEMO.P

[Table of Contents]

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.

Sample Run





No comments:

Post a Comment