We're glad you came by, but you might find what you're looking for elsewhere.
TI-Basic Developer is not the site it once was. While its information on commands and other calculator features remains almost second-to-none, its forum, archives, and even hosting service, Wikidot, have been decaying for years. The calculator community would love to see what you're working on, or help you in your next coding adventure, but TI-Basic Developer is no longer the place to do it.
Instead, you should head over to Cemetech (primarily American) or TI-Planet (primarily international). Both are active, well-established forums with their own archives, chatrooms, reference material, and abundant coding tools and resources. We'll see you there, we hope.
Hello,
Anyone that can help me write some programs? The first one needs to be a program that shows the prime numbers between two parameter (a,b).
Got 3 more programs to write after.
Can pay (small) if someone wants to do it for me
Here's a prime number program I just wrote for you:
PROGRAM:PRIME
:Prompt N
:{2→ L1
:For(I,3,N,2
:If min(fpart(I/L1
:augment(L1,{I→ L1
:End
:L1
This program will find all prime numbers from 2 to N. I optimized it using Ti-BASIC's list arithmetic as well as the fact that the only even prime number is two. I then revised this program to fit your specification and take a range (a,b). The result is below:
PROGRAM:PRIME
:Prompt A,B
:{2→ L1
:For(I,3,B,2
:If min(fpart(I/L1
:augment(L1 ,{I→ L1
:End
:SortD(L1
:1→ I
:Repeat A>L1 (I
:I+1→ I
:End
:I-1→ dim(L1
:SortA(L1
:L1
To make this program work, make sure that A is less than B, that A is greater than two, and that there are prime numbers between A and B. If any of these conditions are not met, the program will not function properly.
I would be happy to write some more programs for you. However, I will not accept pay.
Mine is a bit less optimized, but does the exact same thing
SetUpEditor
ClrList L2
Prompt A,B
For(Y,A,B
Y→X
{1→L1
Repeat Ans=1
2:While fPart(X/Ans
Ans+1
End
Ans→L1(1+dim(L1
X/Ans→X
End
If 2=dim(L1:Then
Disp Y
Y→L2(1+dim(L2
End
End
If dim(L2:L2