test=.[: +/ [: (= <.) [: > [: {: [: p. 1 0 _1 ,~ ] - Bo
Den 22:03 torsdag den 6. august 2015 skrev Roger Hui <rogerhui.can...@gmail.com>: g=: = (^&3 - ])@:(3&(>.@%:)) g */"1 (10^40 60 80x)+/0 1 2 1 1 1 On Thu, Aug 6, 2015 at 11:23 AM, 'Pascal Jasmin' via Programming < programm...@jsoftware.com> wrote: > (] = (^&3 - ])@:(1r3 >.@^~ ])) 990 > > > > ----- Original Message ----- > From: Kip Murray <thekipmur...@gmail.com> > To: "programm...@jsoftware.com" <programm...@jsoftware.com> > Cc: > Sent: Thursday, August 6, 2015 1:58 PM > Subject: [Jprogramming] Detecting special products > > The number 720 is special: it is 8*9*10 the product of three > successive non-negative integers. The first few special numbers are > > */"1 [ 0 1 2 +"1 0 i. 10 > 0 6 24 60 120 210 336 504 720 990 > > Write a verb test that tests whether a non-negative integer is special: > > test 720 > 1 > test 0 > 1 > test 721 > 0 > > --Kip Murray > > > > -- > Sent from Gmail Mobile > ---------------------------------------------------------------------- > For information about J forums see http://www.jsoftware.com/forums.htm > ---------------------------------------------------------------------- > For information about J forums see http://www.jsoftware.com/forums.htm > ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm