Björn Helgason wrote:
> c) you throw <10 and second throw gives total <10 you add a 0
> = 3 figures to count
>
> you take all the throws and create a 10 3 matrix
That's certainly doable :
frame=: (*. (10 >: +/\))@(10&= +. [: ~:/\ 10&>)
rawmat=: frame #"1 (i.3) |.!.0"0 1 ]
fixedmat=: (}: , {: * 10 <: +/@}:)@rawmat
My point was that the third part of the result needs to be
amended with 0 for those frames which scored less than 10
points with the first two balls -- those numbers do not
correspond to an actual throw of a ball.
Anyways, as I said before: your observation was good. I was
just quibbling with the way you had expressed it.
--
Raul
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm