문제

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