Solution finder algorithm using basic operations
问题 I need help with making an algorithm. I am currently designing something for a class I am taking. Given 4 numbers, I need to find all (or at least the first) combination of the 4 numbers using basic operations (+-*/) to make a certain answer. For example, if given numbers [1,2,3,4]. and I have to make the answer 12. I can see (without a program) that (2-1)*3*4 = 12 But for more complex numbers, it may be harder to solve just by thinking about it. So I require a program to help me find at