Question

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.

Was it helpful?

Solution

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))
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top