+ 2
Create a calculator
Hello everyone, I want to create a programme that can evaluate a math expression like 12+3*5/17-2. Any ideas for an algorithm which can do this I’m using c#
1 Antwort
+ 2
There's no algorithm as far as I know. Try splitting the string on every arithmetic operator, then (while keeping precedence in mind) build the evaluator for the outputs of the splitter.
Also, at least try before asking the question, you need to show us your attempt.