Copilot
您的每日 AI 小幫手
Bing 找到這些結果
    附議1最佳答案edited Oct 2, 2018 at 6:50

    This can get really complex quite fast. Consider (1 - 2 * 3). If your calculator only supports addition and negation, this is still not trivial. Consider (5 - 5 - 5). If you consider the input as left associative, you'll get the correct -5, but if you read it as right associative (which is a common mistake if you parse the expression with some LL parser), you'll get 0.

    In order to transform from infix to prefix (which is how you'll calculate your result in Scheme) correctly, you'll usually want to parse the entire input into a parse tree, and o...

    Content Under CC-BY-SA license
    這對您是否有幫助?
  1. Question & Answer
  2. Define a scheme function for infix - Stack Overflow

  3. scheme - Arithmetic calculation using infix notation - Stack Overflow

  4. SCHEME: How to evaluate an arithmetical expression

  5. How to evaluate an infix expression in just one scan using stacks?

  6. interpreter - Evaluation in Scheme - Stack Overflow

  7. 其他人也問了以下問題
    Evaluation of Infix expressions 1 Operands are real numbers. 2 Permitted operators: +,-, *, /, ^ (exponentiation) 3 Blanks are permitted in expression. 4 Parenthesis are permitted
    8. The system throws an error if parentheses are encountered in an infix expression evaluation algorithm. Clarification: The algorithm holds good for infix expression with parentheses. The system does not throw error. 9. Evaluate the following and choose the correct answer.
    My task is to evaluate a fully parenthesized infix expression using a stack. A Stack class has been written for me and I must not change or modify the Stack class. Here are the step by step directions for how to evaluate the infix expression: Just scan the expression from left to right. If it is anything other than a ), push it onto the stack.
  8. Infix to Prefix conversion scheme - Stack Overflow

  9. Scheme Lisp - Using eval for arbitrary arithmetic expressions

  10. stack - Evaluating an infix expression python - Stack Overflow

  11. Operator precedence prefix conversion - Scheme - Stack Overflow

  12. What is easiest way to calculate an infix expression using C …