Your calculator works with floating point, but the Arduino is doing integer math. You're dividing 10 by 291, giving zero.