Answer the question
In order to leave comments, you need to log in
How to insert +-/* and brackets into a sheet containing a set of numbers?
Hello. Please help me write an algorithm for inserting -+*/ and brackets into a sheet with 4 digits. I found that there will be 3 ^ 3 possible combinations of inserting these characters (I haven’t considered brackets yet) (that is, there are 3 possible places for inserting mathematical signs between 4 digits).
But I can not figure out how to go through the cycle, substituting characters in the sheet. It turns out to insert only 1 type of sign in each possible place, and it is impossible to sort through all possible values. I write in java, or rather, I'm just learning.
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question