100 N=1000
110 PRINT "Starting..."
120 PRINT 2;
130 NXT=3
140 ITEST=2
150 LIMIT=SQR(NXT)
160 IF NXT=INT(NXT/ITEST)*ITEST THEN 190
170 ITEST=ITEST+1
180 IF ITEST > LIMIT THEN PRINT NXT; ELSE 160
190 NXT=NXT+2
200 IF NXT > N THEN END
210 GOTO 140
