EECS 12 Summer Session 1 Midterm

General Instructions

Problem

NOTE: This program has two types of variables. Normal variables are the ones that you are used to using. User variables are variables defined by the user with the store command. The term variable is used in both cases, so it is usually up to you to not get confused which one is intended in each context.

Requirements

Hints

Example Session

Here is an example session, with user input in red.


? + 1 2
3.0
? store a
a = 3.0
? + a 5
8.0
? + a a
6.0
? * a a
9.0
? pow a 2
9.0
? store b
b = 9.0
? / b a
3.0
? - b a
6.0
? showall
a = 3.0
b = 9.0
? clear
Variables cleared.
? showall
? + a b
Unknown variable: a
Unknown variable: b
0.0
? + a 1
Unknown variable: a
1.0
? dance
Unknown operation.
? exit