Thanks to everyone! I just started looking over all of the replies, since my defaults were disabled to receive emails from the forum.
Anyway, as a J newbie, and hobbyist programmer / mathematician, I am thoroughly excited to step through all the J verbage! This was a problem for an eight-grader where they only placed 5 multiple choice answers to select from. I imagine there must be an algebraic solution, since programming would not be available to the students in class (unless they have J running on the their smart phones). Thanks again. Rob On Sat, May 25, 2013 at 10:12 PM, Brian Schott <[email protected]>wrote: > peri =: 57 > zmin =: 1 + >. peri % 3 NB. z + (z-1) + (z-2) >: peri > z =: zmin + i.( <.1 - zmin - peri % 2) NB. z < peri % 2 > +/ (<. 1.5 * z) - >. 0.5 + peri %2 NB. (y+(y-1)>:peri-z)*.(y<z) > 61 > > min =: 1 + >.@(%& 3) NB. z + (z-1) + (z-2) >: peri > min 57 > 20 > zz=: min + i.@:<.@:(1 - min - -:) > $zz 57 > 9 > zz 57 > 20 21 22 23 24 25 26 27 28 > > +/ ((<.@: (1.5 * zz)) - >.@: (0.5 + %&2)) 57 > 61 > > > > > > -- > (B=) > ---------------------------------------------------------------------- > For information about J forums see http://www.jsoftware.com/forums.htm > ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
