Google
 

Trailing-Edge - PDP-10 Archives - decus_20tap1_198111 - decus/20-0020/sieve.num
There are 2 other files named sieve.num in the archive. Click here to see a list.
100'  NAME--SIEVE
110'
120'  DISCRIPTION--DEMONSTRATES SIEVE METHOD OF FINDING PRIMES.
130'
140'  SOURCE--UNKNOWN
150'
160'  INSTRUCTIONS--TYPE "RUN" AND FOLLOW INSTRUCTIONS.
170'
180'
190'  *  *  *  *  *  *  MAIN PROGRAM   *  *  *  *  *  *  *  *  *
200'
210 READ E
220  PRINT
230  PRINT
240 PRINT "SIEVING BY " E
250 PRINT
260 FOR N=2 TO 56
270  IF N=2 THEN 350
280  IF N/2>INT(N/2) THEN 310
290 PRINT "  * ";
300  GO TO 400
310  IF N<8 THEN 350
320  FOR F= 3 TO E STEP 2
330  IF N=F*INT(N/F) THEN 390
340  NEXT F
350 IF N>9 THEN 370
360 PRINT " ";
370 PRINT N;
380 GO TO 400
390 PRINT "  * ";
400 NEXT N
410 IF E < 7 THEN 210
420 DATA 2,3,5,7
430 END