Question: General requirements of the curriculum design Algorithm design: The required data structure is designed, the algorithm idea and algorithm steps are given, and the time

General requirements of the curriculum design

  1. Algorithm design: The required data structure is designed, the algorithm idea and algorithm steps are given, and the time complexity of the algorithm is analyzed.
  2. Annotated source code: Paste the source code, preferably annotate the code.
  3. Program run results: Paste the running result screenshot of the source code.
  4. Summary: Summarize what kinds of problems you encounter during the course of implementation and how to take the solutions etc.

Expression Conversion

[Problem Description]

Design a program which can tansfer an infix expression into a postfix expression and compute its result. Suppose the infix expression only includes *, /, +, -, (, ) and the numbers are all integers.

[Basic Requirements]

  1. You are required to use stack.
  2. The infix expression is inputted from keyboard as a string. If the input is legal, please convert the infix expression into postfix expression, calculate the result, and finally output the postfix expression and its value.
  3. If the infix expression entered is illegal, the program can prompt the user to input incorrectly and prompt the user to re-enter. If the input is

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!