From: Donald Patch Date: 2007-08-24T13:49:30+09:00 Subject: Combinations of numbers/operators? This is a really easy one but I'm kind of a kook and new to programming so any help is appreciated. Let's say I have an array consisting of 4 integers i.e. 1,2,3,4. I would like to print every combination of these numbers using math operators such as +-/*. The output should resemble something like: 1+2+3+4 = 10 1+2+3-4 = 2 1+2-3-4 = -4 .... This seems pretty straightforward and should only take a couple lines of code (nested loops?) but I can't quite figure out. Anyone? Thank you. -- Posted via http://www.ruby-forum.com/.