I made a program that finds the factors of a program, but it begins to get very slow. Is there any way to make this program more efficient?
Code:
Also, how would I make this find negative factors?
Code:
ClrHome
Input "Integer: ",A
1->Y
1->X
For(B,1,A\2
If fPart(A/B)=0
Then
Y+1->Y
If Y>10
Then
1->Y
X+4->X
End
Output(Y,X,B
End
End
Y+1->Y
If Y>10
Then
1->Y
X+4->X
End
Output(Y,X,A
Pause
ClrHome
Also, how would I make this find negative factors?