William D McQuain CS 2704 RPN Calculator --------------------------------- Command: enter 17 --------------------------------- Command: enter 42 --------------------------------- Command: enter -3 --------------------------------- Command: enter * --------------------------------- Command: display value -126 --------------------------------- Command: display stack 0: -126 1: 17 --------------------------------- Command: enter + --------------------------------- Command: display value -109 --------------------------------- Command: display stack 0: -109 --------------------------------- Command: clear --------------------------------- Command: display value 0 --------------------------------- Command: display stack stack is empty --------------------------------- Command: enter + Error: not enough operands --------------------------------- Command: enter 100 --------------------------------- Command: enter / Error: not enough operands --------------------------------- Command: display value 0 --------------------------------- Command: display stack 0: 100 --------------------------------- Command: enter 0 --------------------------------- Command: enter / Error: attempt to divide by zero --------------------------------- Command: exit ---------------------------------