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

Reply via email to