I am in the process of making an algebraic calculator. I am currently working on a Least Common Denominator function. That is why I have the comparison tables going. I got buttons that do all the prime numbers and factors needed. Last thing I have to get working properly is comparing the factors of listbox1 and listbox2. When comparing the two listboxes, there are possibilities of duplicate numbers.
Listbox1 would contain 2, 2, 5, 5, 7
Listbox2 would contain 2, 2, 2, 5, 5, 5, 7
What I need to actually happen is the common numbers (2, 2, 5, 5, 7) to be added to Listbox3.
With the current code, all that is added to Listbox3 is 2, 5, and 7.