Finding factors of a given number

Bio_Hazard1282 27 Sep 2018 18:46

So, I created a program for my math homework, and what it does it shows factors of any given number >0, and I was proud when it worked for the first time. But a downside is that it takes FOREVER to calculate factors with input values >99. Here is what I came up with:

```
ClrList L₁
Repeat A
Input "Factors of ",A:End
ClrHome
Disp "Finding factors","of","0 % Complete...
Output(2,4,A
For(I,1,A
For(J,1,A
If A=JI:Then
1+dim(L₁→dim(L₁
J→L₁(Ans
End
If getKey:Then
A→I:Ans→J
{A→L₁
End:End
Output(3,1,int(100I/A
End
ClrHome
Disp "Factors of
Output(1,12,A
SortA(L₁:L₁
```

Is there a way to make this faster and smaller? Thanks for your help!

`Bio_Hazard1282`