What is the relationship between the inputs and the outputs of this function?

Help me with the logic on how to produce the sample output

mysteryFunc(152) ➞ 10
mysteryFunc(832) ➞ 48
mysteryFunc(19) ➞ 9
mysteryFunc(133) ➞ 9

1 answer

  • answered 2020-06-01 15:57 Jacob

    This really isn't the kind of question StackOverflow is meant for. More context is needed, and an attempt should be made to solve it on your own, with that being provided as well.

    That said, it's just the digits multiplied together: 152 => 1 * 5 * 2 = 10 832 => 8 * 3 * 2 = 48 etc.