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

Reply via email to