Hello, Cemetechians. I am new to Cemetech and dont know anything. I am in highschool and trying to find a way to have the calculator factor trinomials for me on the TI-84 PLUS CE. I created my own program, it didn't work. I found a better one, still didn't work. Can anyone please find the mistake or what would be the issue for this program to work.
Code:
Code:
ClrHome
AxesOff
PlotsOff
GridOff
FnOff
ClrDraw
Disp " Quadratic"," Solver",""
Disp "Ax²+Bx+C=0",""
Input "A = ",A
Input "B = ",B
Input "C = ",C
ClrHome
If (B²-4*A*C)<0:Then
B²-4AC→D
(B+√(D))/(2A)→K
(B-√(D))/(2A)→J
Text(1,1,0,"Complex Solutions")
Text(1,20,0,"Solutions:")
Text(1,30,0,"X1 = ",round((B/(2*A)),2),"+",round((√(D)/(2*A)),2),"i")
Text(1,40,0,"X2 = ",round((B/(2*A)),2),"-",round((√(D)/(2*A)),2),"i")
Pause :ClrHome:AxesOn
Stop
End
If fPart(√(B²-4*A*C))≠0:Then
B²-4AC→D
(B+√(D))/(2A)→K
(B-√(D))/(2A)→J
Text(1,1,0,"Not Factorable")
Text(1,20,0,"Solutions:")
Text(1,30,0,"X1 = ",round(K,5))
Text(1,40,0,"X2 = ",round(J,5))
Pause :ClrHome:AxesOn
Stop
End
gcd(abs(A),gcd(abs(B),abs(C)))→G
If G≠0:Then
(A/G)→A
(B/G)→B
(C/G)→C
End
If fPart(√(A))=0 and B=0 and fPart(√(abs(C)))=0:Then
√(A)→A
√(abs(C))→C
Text(1,1,0,"Factored Form")
Text(1,15,0,G,"(",A,"X+",C,")(",A,"X-",C,")")
Text(1,30,0,"2 Real Roots")
Text(1,40,0,"X1 = ",C,"/",A)
Text(1,50,0,"X2 = ",C,"/",A)
Pause :ClrHome:AxesOn
Stop
End
(A*C)→D
0→L
1→J
While L≠B
(D/J)→K
If fPart(K)=0:Then
J+K→L
J+1→J
Else
J+1→J
End
End
J-1→J
A→O
gcd(abs(K),abs(O))→H
(K/H)→K
(O/H)→H
gcd(abs(J),abs(A))→M
(J/M)→J
(A/M)→A
If (K/H)=(J/A):Then
Text(1,1,0,"Factored Form")
Text(1,15,0,G,"(",H,"X+",K,")²")
Text(1,30,0,"1 Real Root")
Text(1,40,0,"X = ",K,"/",H)
Else
Text(1,1,0,"Factored Form")
Text(1,15,0,G,"(",H,"X+",K,")(",A,"X+",J,")")
Text(1,30,0,"2 Real Roots")
Text(1,40,0,"X1 = ",K,"/",H)
Text(1,50,0,"X2 = ",J,"/",A)
End
Pause :ClrHome:AxesOn
Stop