Skip to content

Instantly share code, notes, and snippets.

@kylemsguy
Last active April 25, 2024 10:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kylemsguy/e37c98b49b5015e8cb1c31ad03fc016c to your computer and use it in GitHub Desktop.
Save kylemsguy/e37c98b49b5015e8cb1c31ad03fc016c to your computer and use it in GitHub Desktop.
[PRIFACTR.8xg] Prime factorization program for TI-83+/84+
Input "NUM:",M
If fPart(M
Then
Disp "ERR: NUM IS NOT INT"
Stop
End
0->C
2->T
M->I
While I>1 and T<sqrt(M
I/T->I
If fPart(I
Then
If C>0
prgmPRNTFCTR
0->C
If T=2
Then
3->T
Else
T+2->T
End
Else
C+1->C
End
End
If not(I=1
Then
1->C
I->T
End
prgmPRNTFCTR
T->N
prgmZNUM2STR
Str1->Str2
C->N
prgmZNUM2STR
Disp Str2+"^"+Str1
"?
For(X,1,1+log(N+not(N
sub("0123456789",iPart(10fPart(N10^(-X)))+1,1)+Ans
End
sub(Ans,1,length(Ans)-1->Str1
@kylemsguy
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment