Advertisement
linesguy

prime finder

Jan 12th, 2017
126
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.28 KB | None | 0 0
  1. 0 rem Update mar 17: Program now runs about 5% faster. Yes i know this is useless.
  2.  
  3. 10 text : home : ?"Prime numbers":?" "; : onerr goto 50
  4.  
  5. 20 for N = 5 to 1321 step 2 : SN = N^0.5 : for P = 3 to SN step 2
  6. 30 if int(N/P) = N/P then next N
  7. 40 next P : print N;" "; : next N
  8. 50 end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement