Basic Math Operators
regular, integer, and modular division
Basic Math Operators
(Plese Excuse My Dear Aunt Sally)
paremtjesis ()esponents 5^4
multiplication *
division /
addition +
subtraction -
Samples of Math with Various Operators
+
intNumber=num1+num2
-
intNumber=num1-50
*
intNumber=num1*num2
/
intNumber-51/num2
Integer Division \
intNumber=51\num2
Modulus Mod
intNumber=5mod2
^
intNumber=5^3 '5 cubed
Regular Division
*Rounds the decimal portion if assigned to an integer
*This is the division with which you are most familiar
Integer Division
*Cuts off the decimal portion and returns the integer( \ )
ex:19\5=3 not 3r4
Modulus Division
*returns the remainder resulting form the division ( mod )
ex:19 mod 5=4 not 3r4