[Jprogramming] sum of digits

Roger Hui RHui000 at shaw.ca
Sun Jan 8 05:42:03 HKT 2006


That's the one I had.  Also:
+/,.&.":4^500x



----- Original Message ----- 
From: "Henry Rich" <HenryHRich at nc.rr.com>
To: "'Programming forum'" <programming at jsoftware.com>
Sent: Saturday, January 07, 2006 1:32 PM
Subject: RE: [Jprogramming] sum of digits

+/"."0":4x^500



> -----Original Message-----
> From: programming-bounces at jsoftware.com 
> [mailto:programming-bounces at jsoftware.com] On Behalf Of Roger Hui
> Sent: Saturday, January 07, 2006 4:20 PM
> To: Programming forum
> Subject: Re: [Jprogramming] sum of digits
> 
> That is correct.  There are shorter and/or neater phrases. e.g.
> 
>    + / 1j1 & # &. ":  2 ^ 1000x
> 
> 
> ----- Original Message ----- 
> From: "Eugene McDonnell" <eemcd at mac.com>
> To: "Programming forum" <programming at jsoftware.com>
> Sent: Saturday, January 07, 2006 12:52 PM
> Subject: Re: [Jprogramming] sum of digits
> 
> On Jan 7, 2006, at 12:34 PM, Roger Hui wrote:
> 
> > Write a J phrase to compute the sum of the decimal digits 
> of 2 to the
> > power 1000.  The shortest phrase I can devise has 14 characters.
> 
> Is this correct?
> 
>     + / ". 1j1 & #  ":  2 ^ 1000x
> 1366




More information about the Programming mailing list