Code for Calculator in M.A.D.