02-14-2012, 07:00 AM
Yes this definitely works, I see you use modulus to calculate the remainder of 0 for your divisibility, and anything not divisible by 2 won't be divisible by 4,6,8, etc... So checking for divisibility by 2 from the start, and then counting every odd number for divisibility from that point forward makes lots of sense, nice loop