This worked better when the numbers were 5.7 and 4.7 as it actually was in
the original
  5.70 4.70 % 2 2 $ 3 5 5 3
 1.9             1.14
0.94 1.56666666666667
  B=:5.70 4.70
  B (+/ .*) %.A
0.4 0.9

2009/1/12 HitrovD <[email protected]>

> On Mon, 12 Jan 2009 17:03:16 +0300, Björn Helgason <[email protected]>
> wrote:
>
> > I was helping my little daughter with algebra and one of the problems
> > was to
> > figure out x and y from following
> >
> > 3x+5y=570
> > 5x+3y=470
> >
> > Actually x was apples and y bananas
> >
> > Anyway I am thinking is there a way to stick this here above into J to
> > figure out x and why?
> >
> > The solution is straight forward enough
> >
> > 2y=100+2x
> > y=50+x
> > 5x+150+3x=470
> > 8x=320
> > x=40
> > y=90
> >
> > But how to do it in J
>
>
>    A=:2 2$3 5 5 3
>   B=:570 470
>   B (+/ .*) %.A
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
>



-- 
Björn Helgason, Verkfræðingur
Fugl&Fiskur ehf,
Þerneyjarsundi 23, Hraunborgum
Po Box 127,801 Selfoss ,
t-póst: [email protected]
gsm: +3546985532
Landslags og skrúðgarðagerð, gröfuþjónusta
http://groups.google.com/group/J-Programming


Tæknikunnátta höndlar hið flókna, sköpunargáfa er meistari einfaldleikans

góður kennari getur stigið á tær án þess að glansinn fari af skónum
         /|_      .-----------------------------------.
        ,'  .\  /  | Með léttri lund verður        |
    ,--'    _,'   | Dagurinn í dag                     |
   /       /       | Enn betri en gærdagurinn  |
  (   -.  |        `-----------------------------------'
  |     ) |         (\_ _/)
 (`-.  '--.)       (='.'=)
  `. )----'        (")_(") ☃☠
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to