Skip to content

Instantly share code, notes, and snippets.

@Code-Tap
Created January 6, 2018 23:14
Show Gist options
  • Save Code-Tap/46deb3e90d03948dcc78bb6fbdf49ea0 to your computer and use it in GitHub Desktop.
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
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