8-Bit Software Online Conversion
Prime Numbers - Listing
10REM PRIME NUMBERS
12MODE4
14VDU 19,0,4,0,0,0
20CLS
30PRINT:PRINT TAB(8,1) "LIST OF PRIME
NUMBERS"
40PRINT TAB(0,4)"PRIME NUMBERS = 1
2 ......"
50T=0
60A=1
70Y=0
80FOR N=1 TO 167
90A=A+2
100M=1
110M=M+1
120IF M>A/2 THEN 160
130B=A/M
140IF B=INT(B) THEN 90 ELSE GOTO 110
150IF B=1 THEN PRINT TAB(20,3) A ELSE
GOTO 110
160PRINT TAB(Y*4,6+T);A
170IF (Y/10)=INT(Y/10) THEN Y=0
180IF Y=0 THEN T=T+1
190IF N<2 THEN T=T-1
200Y=Y+1
210NEXT
220END