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