in reply to Re: What am I missing?
in thread What am I missing?

Alright, in words... The object is to get all prime numbers up to and including our input. First we take the lowest number, which in this case is 2. We need to eliminate all multiples of that number. In other words, create an array where the element values divided by 2 yields a remainder. At this point we have an array of nothing but stuff that is NOT divisible by 2. This is our new list, so we save it. Now we go up to 3 and repeat, saving our new array as we go. Ahhh, I see what's going on. The first element in each new array is greater than the element we are going to divide by. So it leaves 0 and a remainder. I need to use a floor or int function. Stay tuned...