Every fifth count

J

John

Hi

I have a counter that counts 1,2,3 and onwards. How can I find when counter
is at a multiple of 5 ie 5 or 10 or 15 etc?

Thanks

Regards
 
A

Anthos

Just to expand on Allen's answer (it is the best answer)
the mod will basicly return the remainder after a divisioin.

So in this case, 15 mod 5 would return 0 as there are no remainders,
but a 12 mod 5 would return 2 as there are 2.

Testing for a value of 0 will indicate whether it is a multiple of 5
or not.
 
Top