File PRI434.PS

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

PROGRAM PRIMZAHL (OUT);
CONST
  N=1000;
VAR
  FELD:ARRAY [1:N] OF INTEGER;
  I,Y,A,S:INTEGER;
(*---------- Hauptprogramm ----------*)
BEGIN
  FOR I:=1 TO N DO FELD[I]:=I*2+1;
  FOR I:=1 TO TRUNC (SQRT (N)) DO BEGIN
    Y:=I;A:=FELD[I];
    IF FELD[I]<>0 THEN BEGIN WRITELN(FELD[I]);
      REPEAT FELD[A+Y]:=0;
             Y:=Y+A;
      UNTIL  (A+Y)>=N
    END;
  END;
  FOR I:=TRUNC (SQRT (N)+1) TO N DO
    IF FELD[I]<>0 THEN WRITELN(FELD[I])
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