0
Mathematics code Playground (Java)
I'm stuck in this one. First I had a problem with multiple operators that makes cases 3 and 4 fail. I think this is solved but case 4 still fails. I test my code with multiple operators and precedences but I don't found the problem. I'll apreciate some hint about case 4. My try: https://code.sololearn.com/czicvL8Iz0bj/#java
5 Answers
+ 1
Julio Codesal check Dennis' reply from this thread. Looks you don't need to worry about operator precedence.
https://www.sololearn.com/Discuss/2142606/?ref=app
+ 1
Thanks Mihai Apostol
With this in mind, I made a simple code that passed the test.
But I still wonder why my first code did not pass test 4.
0
I whant to operate first with "/" and "*". Then I loop trought the array and perfom the operation with the numbers both sides of the operator. I also replace this numbers with the result and remove this operator. number.set(i.... is for this replacement, it may be in the index position.
IÂŽv added some coments in this code part.
0
Julio Codesal chech this code
https://code.sololearn.com/ceEoohJRqdgp/?ref=app
0
Naveen Surya --> Either your code is totally buggy, or else Java doesn't accept ScriptEngineManager anymore, because it failed all tests.