Question: All code is written via C++ programming language. Write a math expression parser and evaluator which uses Djikstra's Shunting Yard Algorithm to convert an infix
All code is written via C++ programming language.
Write a math expression parser and evaluator which uses Djikstra's Shunting Yard Algorithm to convert an infix expression to a postfix expression. It must have capabilities for multiplication, division, addition, subtraction, basic exponentiation, sqrt root (which are denoted as input via 'rt'), n'th root of x (where 'n' is replaced by a number). It should return all results in integer form (no decimals), so Euclid's algorithm for the prime factorization method must be used to simplify fractions and return the fractions as a result in lowest terms.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
