سؤال

I'm trying to multiply the digits of a number in J.

My idea is to convert a number to a list of his digit, and then multiply them.

ps: I am searching for an implicit function.

Update: I found a possible solution, it was easiest that I thought.

هل كانت مفيدة؟

المحلول

I found the answer in another my question: List a number's digits in J

So, I just need to do:

intToList =: (".@;"0@":)
*/(5{.(intToList 123456789))
مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top