NB. without looking at the other solutions...
   NB. 25 characters---I made it twice!

   %/((+/ .*)~^:4)(1 2,:2 3)
0.618034 0.618034

   NB. I can squeeze that to 19 characters
   %/+/ .*~^:8>:2[\i.3
0.618034 0.618034

Date: Thu, 25 Feb 2016 02:49:56 -0500
From: "Linda A Alvord"<[email protected]>
To:<[email protected]>
Subject: [Jprogramming] Morning Mystery
Message-ID: <000001d16fa1$1f8ac160$5ea04420$@net>
Content-Type: text/plain;       charset="us-ascii"

Using only the single digit counting numbers:

    >:i.9

1 2 3 4 5 6 7 8 9

write the shortest possible expression to produce:

0.618034

Linda

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

Reply via email to