Is there any function that can take input(arrays of numbers) and find all possible calculations on them that would result in the desired result(number).
For example if input is 2, 1, 4, 6, 7 and the desired result is 3. It would return something like.
2+1 = 3
7-4 = 3
6/2 = 3
What I think you can do is you can make it generate random numbers using a rng
module. Make them do random numbers in a rational range and do random operations with them. Print the equations IF they equal a certain number. YOu could also make a simple AI like thing that sets a rational range of the random numbers to make it faster. (Notice/edit, the random range selects a number and the number is converted to one of the input numbers.)
EXAMPLE