Syntax

<firstOperand> + <secondOperand>
<firstOperand> - <secondOperand>
<firstOperand> * <secondOperand>
<firstOperand> / <secondOperand>
<firstOperand> ^ <secondOperand>

put 14 + 32 into myFavoriteNumber
put number of buttons / 5 into gridRowLength
put 2 ^ 16 into twoToTheSixteenth

Explanation

Stacksmith supports 5 standard mathematical operators:

  1. + adds the number firstOperand to the number secondOperand. (E.g. 15 + 5 = 20)
  2. - subtracts the number secondOperand from the number firstOperand. (E.g. 15 - 5 = 10)
  3. * Multiplies the number firstOperand with the number secondOperand. (E.g. 2 * 3 = 6)
  4. / Divides the number firstOperand by the number secondOperand. Raises an error and exits to top if secondOperand is 0. (E.g. 10 / 2 = 5)
  5. ^ Raises the number firstOperand to the power of secondOperand. (E.g. 3 ^ 3 = 3 * 3 * 3 = 27)