String is given in form of a variable. Let's call that variable
s. It is known that the string looks like a calculation expression using
/. There's no parentheses.
Calculate the expression inside the string and store the result in variable
r (you can assume it's already declared). All the divisions can be performed without remainders (
4-6*3/8 is invalid because 8 is not divisible by 3). Length of string is not limited. String can't contain
Challenge is not supposed to give advantage for some languages, so I decided to change some math rules:
Operators precedence is a little bit different than it is in math and programming language expressions: multiplication/division is still higher than addition/substraction. However, if there're some multiplications/divisions in a row, it is performed right-to-left. Addition/substraction is preformed left-to-right.
The shortest code (in bytes) wins.