File RANDOM.BK

Directory of image this file is from
This file as a plain text file

PROGRAM RANDOMIZE2(INPUT,OUTPUT,NUM1);
  VAR I,K,N,N1:INTEGER;
  FUNCTION RND:REAL;
    CONST M=100000;
          A=20621;
          C=21131;
  BEGIN (*RND*)
    N1:=(A*N1+C) DIV M;
    RND:=N1/M
  END;(*RND*)

BEGIN I:=0;
  WRITE("ZEIT IN HHMM"); READLN(N1); WRITELN;
  WRITE("ANZAHL DER ZUFALLSZAHLEN"); READLN(K);
  FOR K:=K DOWNTO 1 DO
  BEGIN
    N:=TRUNC(RND*1000+1);
    WRITE(N:5); WRITELN(NUM1,N);
    I:=I+1; IF I=10 THEN BEGIN I:=0; WRITELN END
  END
END.



Feel free to contact me, David Gesswein djg@pdp8online.com with any questions, comments on the web site, or if you have related equipment, documentation, software etc. you are willing to part with.  I am interested in anything PDP-8 related, computers, peripherals used with them, DEC or third party, or documentation. 

PDP-8 Home Page   PDP-8 Site Map   PDP-8 Site Search