From: Glenn Jackman Date: 2010-04-02T02:10:05+09:00 Subject: Re: Ruby solve classic math problem: make 56 from four 4s At 2010-03-31 05:11PM, "Kelly Jones" wrote: > A classic math problem asks "using only four 4s and any > mathematical operation, come up with the number > 56". "4!+4!+4+4" is one of probably several answers [1]. > > I want to write a ruby program that solves the > generalization: "given X number of the digit Y and a > set of permitted mathematical operations/functions, can > you come up with the number Z?" > > Has anyone already done this? See http://rosettacode.org/wiki/24_game_Player This uses 24 instead of 56, and the operations are limited to +-*/ but the idea is there. -- Glenn Jackman Write a wise saying and your name will live forever. -- Anonymous