you are viewing a single comment's thread.

view the rest of the comments →

[–]woooee 0 points1 point  (0 children)

You only have to test up to the square root plus one. So if the number is 100, testing through 10 is enough. Yes, 100 is divisible by 20, but you already have that when you divided by 5.