Arduino Calculator not working

Did you do some serial prints to track what your variables are doing?

.