Wednesday, October 6, 2010

Prime number finder

clg

f=0
for h = 3 to 10000 step 1
if f=0 then print h-1
f=0
for i = 2 to int(h/2)+1 step 1
if int(h/i)=h/i then f=1
if int(h/i)=h/i then i=h/2
next i
next h

1 comment: