Hi all
Was wondering if anyone has attempted to do something like this and could give me a starting point to attempt it.
I am looking into writing a program which takes a random selection of 6 numbers and generates an equation using all the number only once.
I can write the app so that it just reorganises the numbers and places a random char from +, -, *, / between each number which works.
What i am really looking for is some way of including parenthesis so that i can have functions that look like
Numbers: 1,2,3,4,2,2
1 + (2 * 3) - (4 /2) +2
or even
4 * ((2*3) / 2) + 2 - 1
Does anyone have any ideas how i could go about implementing this?
Thanks in advance
Was wondering if anyone has attempted to do something like this and could give me a starting point to attempt it.
I am looking into writing a program which takes a random selection of 6 numbers and generates an equation using all the number only once.
I can write the app so that it just reorganises the numbers and places a random char from +, -, *, / between each number which works.
What i am really looking for is some way of including parenthesis so that i can have functions that look like
Numbers: 1,2,3,4,2,2
1 + (2 * 3) - (4 /2) +2
or even
4 * ((2*3) / 2) + 2 - 1
Does anyone have any ideas how i could go about implementing this?
Thanks in advance