+ 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#

10th May 2019, 11:28 AM
Coder++
Coder++ - avatar
1 Resposta
+ 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.
10th May 2019, 10:40 PM
inxanedev!
inxanedev! - avatar