Return a number between 0 and 4

Posted by munchine on Stack Overflow See other posts from Stack Overflow or by munchine
Published on 2010-04-27T23:59:17Z Indexed on 2010/04/28 0:03 UTC
Read the original article Hit count: 333

Filed under:
|

How do I return a number between 0 and 4, depending the input number?

For example if I pass it number 23 it will return 3. The number set should look like

0 5 10 15 20 ..

1 6 11 16 21 ..

2 7 12 17 22 ..

3 8 13 18 23 ..

4 9 14 19 24

What's the math for this?

© Stack Overflow or respective owner

Related posts about number

Related posts about algorithm