+dhe Posted April 7 Share Posted April 7 Code and Really Good Commentary: https://docs.google.com/document/d/1u4iZYkWHVluzqbpyV-CPJxZLFkchP95xDryEYVpESD8/mobilebasic?mibextid=Zxz2cZ How it started: When it ended: Just the code: 100 REM INTERFACE AGE's benchmark program to110 REM 'discover' the first 1000 Prime numbers120 REM130 PRINT "Starting:"140 FOR N = 1 TO 1000150 FOR K = 2 TO 500160 LET M = N/K170 LET L = INT(M)180 IF L = 0 THEN 230190 IF L = 1 THEN 220200 IF M > L THEN 220210 IF M = L THEN 240220 NEXT K230 PRINT ;N;" ";240 NEXT N250 PRINT CHR$(7)260 PRINT "Finished."270 END 6 Quote Link to comment Share on other sites More sharing options...
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.