3 ms·
> You don't want to modulo. You want to multiply the last digit by the number of children and divide by ten. Let's see how this turns out: n n * 7 / 10
by lutusp 12y ago
> You don't want to modulo. You want to multiply the last digit by the number of children and divide by ten.
Let's see how this turns out:
n n * 7 / 10
--------------
0 0
1 0
2 1
3 2
4 2
5 3
6 4
7 4
8 5
9 6
It's the same for most other numbers of children. Thanks for playing, no cigar.