This program can be used to factorize a quadratic function.
Is their a way it can be optimized, tweaked, or improved?
Any suggestions will be appreciated :)
ClrHome
1->D
1->F
Disp "AX^^2+BX+C"
Input "A: ",A
Input "B: ",B
Input "C: ",C
ClrHome
Lbl 1
A/D->E
C/F->G
If E!=round(E,0
Then
D+1->D
Goto 1
End
If G!=round(G,0
Then
F+1->F
1->D
Goto 1
End
If DG+FE=B
Then
Goto Z
Else
D+1->D
End
If D>abs(A
Then
~D->D
D+1->D
End
If D=0
Then
F+1->F
1->D
End
If F>abs(C
Then
~F->F
F+1->F
End
If F=0
Then
Disp "NOT FACTORABLE"
Stop
Else
Goto 1
End
Lbl Z
Output(1,1,"( X+ )( X+ )"
If D<1 and E<1
Then
~D->D
~E->E
~F->F
~G->G
End
Output(1,2,D
Output(1,6,F
Output(1,10,E
Output(1,14,G
Pause
ClrHome
Stop