basic calculator with a horrible infinite loop