+/a#~0=5|a=.100+i.900 98550 13 :'+/y#~0=5|y' [: +/ ] #~ 0 = 5 | ] ([: +/ ] #~ 0 = 5 | ]) 100+i.900 98550 (] +/@#~ 0 = 5 | ]) 100+i.900 98550
-- Raul On Tue, Jan 16, 2018 at 11:39 PM, Skip Cave <[email protected]> wrote: > I want to find the sum of all the three-digit numbers that are divisible by > 5 (Quora problem). > > My explicit solution is: > > +/a#~0=5|a=.100+i.900 > 98550 > > To find a tacit version: > > sm=. +/a#~0=5|a=.100+i.900 > > sm > > [: ([: +/ ] #~ 0 = 5 | ]) (100+i.900)"_ > > > Is there a more compact way to express this function tacitly? > > > Skip > > > Skip Cave > Cave Consulting LLC > ---------------------------------------------------------------------- > For information about J forums see http://www.jsoftware.com/forums.htm ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
