But >: 1505 % a 8 6.47273 5.49254 5.23944 4.58333 3.59483 and non-integers would lead to errors in later expressions.
----- Original Message ----- From: Randy MacDonald <[EMAIL PROTECTED]> Date: Friday, January 4, 2008 12:10 Subject: Re: [Jprogramming] Not so hard to solve the comic in J? To: Programming forum <[email protected]> > Hello Roger; > > n =: >: 1505 % a > > If this has been noted, my apologies: I'm doing Xmas catchup. > > Roger Hui wrote: > > The calculation of n was off by 1, and the correction is as follows: > > > > a=: 215 275 335 355 420 580 > > n=: 1 + <.1505 % a > > b=: 1505 = ((#: i.@(*/)) n) +/ .* a > > n #: I. b > > 1 0 0 2 0 1 > > 7 0 0 0 0 0 > > (n #: I. b) +/ .* a > > 1505 1505 > > > > > > > > ----- Original Message ----- > > From: Roger Hui <[EMAIL PROTECTED]> > > Date: Friday, December 21, 2007 13:43 > > Subject: Re: [Jprogramming] Not so hard to solve the comic in J? > > To: Programming forum <[email protected]> > > > > > >> a=: 215 275 335 355 420 580 > >> n=: <.1505 % a > >> b=: 1505 = ((#: i.@(*/)) n) +/ .* a > >> n #: I. b > >> 1 0 0 2 0 1 > >> 1 0 0 2 0 1 +/ .* a > >> 1505 > >> > >> > >> > >> ----- Original Message ----- > >> From: Devon McCormick <[EMAIL PROTECTED]> > >> Date: Friday, December 21, 2007 13:32 > >> Subject: [Jprogramming] Not so hard to solve the comic in J? > >> To: J-programming forum <[email protected]> > >> > >> > >>> How hard is it to solve this problem? http://xkcd.com/287/ ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
