Hi experts,
What's the best way to tell if a number is evenly divisible by three? For instance, I have been doing it like this:
For i = 1 to 10,000
if i / 3 = i \ 3 then
'do something
end if
next i
That's quite neat... but I don't think it's very fast because the computer hates the / symbol. I could do it using the ROUND function as well, but that is also slow. I suppose I could also do:
blnfirstmatch = true
blnsecondmatch = false
For i = 1 to 10,000
if blnFirstMatch = true then
blnFirstMatch = false
blnSecondMatch = true
elseif blnSecondMatch = true then
blnSecondMatch = false
else
blnFirstMatch = true
'do something
end if
next i
There are probably other ways too. If any experts can let me know what is definitely the fastest way, I would be very very grateful.
Thank you,
PatternNut
Start Free Trial