Consider the following input and output:

INPUT: (((5 + 1) – (7 – 4)) / (11 – 8))
OUTPUT: 5 1 + 7 4 – – 11 8 - /

2.1. What variables do you need to consider for the input?

2.2. Describe in English, step by step, the algorithm that transforms the given input into the given output. [Hint: You need to use a stack].

2.3. Trace your algorithm by hand with the given input. Your trace MUST show the current character to be read, the operation to be applied, the content of the stack, and the output printed on the screen.

2.4. Can you determine the conversion that has been applied on the given input?

Similar Questions
  1. Write a function rule for the statement.1. The output is half of the input. 2. The output is three less than the input. 3. The
    1. answers icon 1 answer
  2. Which of these could be a row for a NOT logic table?(1 point) Responses first input: 0, second input: 0, output: 0 first input:
    1. answers icon 1 answer
    1. answers icon 1 answer
  3. Which of these could be a row for a NOT logic table?(1 point) Responses first input: 0, second input: 0, output: 0 first input:
    1. answers icon 1 answer
more similar questions