REM ERATOSTHENES SIEVE PRIME NUMBER PROGRAM IN BASIC 
1 SIZE = 7190
2 DIM FLAGS(7191)
3 PRINT "ONLY 1 ITERATION"
5 COUNT = 0
6 FOR I = 0 TO SIZE
7 FLAGS (I) = 1
8 NEXT I
9 FOR I = 0 TO SIZE
10 IF FLAGS (I) = 0 THEN 18
11 PRIME = I+I + 3
12 K = I + PRIME
13 IF K > SIZE THEN 17
14 FLAGS (K) = 0
15 K = K + PRIME
16 GOTO 13
17 COUNT = COUNT + 1
18 NEXT I
19 PRINT COUNT," PRIMES"
20 SYS 65535
