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.

Était-ce utile?

La 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))
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top