Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
10 N=1:S=1
20 TM=TIMER
30 FOR X = 1 TO 1000
40 N=N+S
50 IF S > 100 OR S < 1 THEN S=-S
60 NEXT X
70 T=TIMER:PRINT:PRINT (T-TM)/60;"SECONDS":REM RESULT = 16.15
80 TM=TIMER
90 FOR X = 1 TO 1000
100 N=N+S
110 IF S < 1 THEN S=-S ELSE IF S > 100 THEN S=-S
120 NEXT X
130 T=TIMER:PRINT:PRINT (T-TM)/60;"SECONDS":REM RESULT = 15.95
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.