Formatting brings other issues to the problem:

    10(#. inv) 12345678901234   NB. works on the numbers
1 2 3 4 5 6 7 8 9 0 1 2 3 4
    1j1#": 12345678901234  NB. runs into a format wall
1 . 2 3 4 5 7 e 1 3


On 4/29/2011 6:07 AM, Björn Helgason wrote:
> 1j1#":12345
>
> 2011/4/29 bill lam<[email protected]>
>
>> one way is
>>    ]a=. ".,.":12345
>> 1 2 3 4 5
>>     +/a
>> 15
>>
>> project euler?
>>
>> Птн, 29 Апр 2011, Daniel Roe писал(а):
>>> If we add up the digits of the number 12345 we get 1+2+3+4+5 = 15.
>>> I want to be able to do math upon the individual digits.
>>> How would I do that in J?
>>> Dan
>>>
>>> ----------------------------------------------------------------------
>>> For information about J forums see http://www.jsoftware.com/forums.htm
>> --
>> regards,
>> ====================================================
>> GPG key 1024D/4434BAB3 2008-08-24
>> gpg --keyserver subkeys.pgp.net --recv-keys 4434BAB3
>> ----------------------------------------------------------------------
>> For information about J forums see http://www.jsoftware.com/forums.htm
>>
>
>

----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to