I have 4 years PHP and C# experience, but Math is not my better side. I thnik that i need in this project use some math algorithms.
When page load I need randomly create 7 numbers, 6 are numbers that I can use to calculate given three digit number:
- rand 1-9
- rand 1-9
- rand 1-9
- rand 1-9
- rand 10-100 //5 steps
- rand 10-100 //5 steps
and given number to calculate is 100-999,
I can use this operations: +, -, /, *, (, )
What is best algorithm for this? I probably need to try all possible combinations with this 6 numbers to calculate given number or closest number of calculations.
example: let say that given three digit number is 350, and I need to calculate this number from this numbers: 3,6,9,5 10, 100 so formula for this is: (100*3)+(5*10) = 350
if is not possible to calculate exact number, than calculate closest.
You don't need to solve this problem completely, you can introduce me to solve this problem by paste some pseudo, or describing how to do that.