From: Josh Cheek Date: 2011-09-04T00:02:13+09:00 Subject: Re: Beginner needing help - Writing right-angle triangle program --0016e65da5683e2f0104ac0ac361 Content-Type: text/plain; charset=ISO-8859-1 On Sat, Sep 3, 2011 at 8:49 AM, Patrick Lynch wrote: > I've been going through a Haskell tutorial (Just to see what it's like) > and saw an example program which would tell me how long each side a > right-angle triangle is, when given the perimeter. It seemed pretty > simple, and me, being the kind of guy that likes to write the same > program in multiple languages, tried to write it in ruby. > > I'm pretty stumped though, and would like someone a little higher up to > give me a nudge in the right direction :D. > > (Eg. program would return (6, 8, 10) and (8, 6, 10) when you say that > the perimeter is 24) > > Thanks in advance! > > -- > Posted via http://www.ruby-forum.com/. > > > > Show us your Haskell and Ruby code. There are a lot of ways to generate pythagorean triples (what I assume you're actually asking for), so hard to translate it without seeing the original. Also, just FYI, this is the domain of problem that Haskell was made for, but Ruby isn't particularly good at math algorithms. --0016e65da5683e2f0104ac0ac361--