A confused calculator
Computer Science Level 1In a stack \(s\), TIM
is equivalent to s.push(s.pop() * s.pop())
and SUM
is equivalent to s.push(s.pop() + s.pop())
. What will the following stack machine evaluate the operations as?
1 2 3 4 5 6 7 8 9 

Your answer seems reasonable.
Find out if you're right!
Sign up to access problem solutions.
That seems reasonable.
Find out if you're right!
Already have an account? Log in here.