blob: 492a572dcbdc329dd67db1ff8f377f20c74ba0f7 (
plain)
1
2
3
4
5
6
7
8
|
public class Calculator {
public static void main(String[] args) {
String expr = "(36 * 3 + 9 * 7) * (84 / 12) * 5";
Parser p = new Parser(expr);
String postfix = p.toPostFix();
System.out.println(p.evalExpr(postfix));
}
}
|