Created
January 6, 2018 23:14
-
-
Save Code-Tap/46deb3e90d03948dcc78bb6fbdf49ea0 to your computer and use it in GitHub Desktop.
TI-BASIC Generate prime numbers upto N and output to a list
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2→L₆(1 | |
3→L₆(2 | |
Prompt N | |
For(B,0,N-1 | |
dim(L₆→D | |
2+L₆→(D→X | |
1-A | |
Repeat L₆(A)>√(X | |
If not(fPart(X/L₆(A | |
Then | |
2+X→X | |
1→A | |
End | |
1+A→A | |
End | |
X→L₆(D+1 | |
End |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment