Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support |

January 21st, 2013, 03:27 PM
 Seaspider1
n00b DevH'er

Join Date: Jan 2013
Posts: 1
Time spent in forums: 10 m 27 sec
Reputation Power: 0
Programming Factors...to a list?

I wrote a program for my TI-84 Plus Silver Edition to find all factors of a number inputed. For instance, the home screen would read when executed for the number 102:

prgmFACTOR
(Input)?102
1
102
2
51
3
34
6
17
(Disp) "NUMBER OF FACTORS"
8
Done

I have the program check numbers between 1 and the sqrt(inputed number) with each lower factor (1, 2, 3, 6) as a variable and the upper factor (102, 51, 34, 17) as another variable. Both of these variables go through a loop of adding one to the lower factor, checking, and displaying both. When a large number is factored, I can't scroll up to view the factors that have been calculated because all history of the execution disappears.

My question is whether I can, still using the loop, put the lower factors in List 1 and the upper factors in List 2, lining up respectively so that it can be more easily viewed. When I tried to write it out, it would only put one factor in each list and then as it looped it would replace the factor with the next, leaving both List 1 and List 2 with no more than one number each.

If it helps at all, I have "A" as the original number and "E" as the lower factor being increased incrementally. When A/E = a number without a decimal:
Disp A, A/E

So to further clarify, I need help with getting "A" in List 1 and "A/E" in List 2.

Any help would be greatly appreciated!

January 21st, 2013, 06:34 PM
 Weregoose
Contributing User

Join Date: Dec 2011
Posts: 40
Time spent in forums: 16 h 2 m 21 sec
Reputation Power: 2
Using matrices:

:Input A
:[[A][1
:For(E,2,√(A
:If not(fPart(A/E
:augment(Ans,[[A/E][E
:End
:Ans

 Viewing: Dev Hardware Forums > SOFTWARE > TI 83/84 > Programming Factors...to a list?