I am currently making a program that takes two numbers, A and B, and find the divisible numbers between them both.
Ex. 40 and 20, 1,2,4,10,etc.
To accomplish this task I need some help,
One element of this program is taking the two numbers dividing them by a common integer then storing each number after division to a list
:1→N
:1→G
{0,0,0}→q This stores (0,0,0) to a the variable q, but also makes it a list
{0,0,0}→r
:Input A Input two numbers
:Input B
:
:A/n→q[g] Division by common number, Q and R are lists with g being the position the divided number is being stored.
:B/n→r[g]
:Now the really tricky part is here.
How do i cross check each of the lists to find a common number besides using SortA and SortD since they have limited use?
Ex.
:List Q {5,6,7}
:List R {6,8,9}
:
:
: Using SortA or SortD would not work to cross check the lists even though there is a common number.*SideNote I typed this all by hand so if the coding looks funky thats my bad*
Please comment to help me in TI-89 Format with somewhat of an explaintion of your coding.
-Thanks Keynah
(I will check this in 2-3 days , 6/8/2012)