when the digits are added. The digits in K4 are added again to result in one which is
the lucky number for Poker Pete.
You should note that we would have obtained identical results even if the formula for
K2 was written as
=INT(J2/10)+MOD(J2,10)
This is because INT(J2/10) will return 0 and MOD(J2, 10) will return J2 if J2 is
less than 10. The same is true for cell L2; its formula could have been
=INT(K2/10)+MOD(K2,10)
This just shows that you can implement the same logic in more than one way.
Try It
We did the lucky number exercise using INT and MOD functions to isolate differ-
ent digits of a four-digit number. Now, con ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month, and much more.