100 REM  NAME--SIEVE
110 REM
120 REM  DISCRIPTION--DEMONSTRATES SIEVE METHOD OF FINDING PRIMES.
130 REM
140 REM  SOURCE--UNKNOWN
150 REM
160 REM  INSTRUCTIONS--TYPE "RUN" AND FOLLOW INSTRUCTIONS.
170 REM
180 REM
190 REM  *  *  *  *  *  *  MAIN PROGRAM   *  *  *  *  *  *  *  *
200 REM
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
