Math Operators

Gotta have em'

Basic math operators

—+ (add),

—- (subtract)

—/ (divide)

—* (multiply)

—^ (Exponents)

Sample of Math with Various Operators

— Addition +

¡ intNumber = num1 + num2

— Subtraction –

¡ intNumber = num1 - 50

— Multiplication *

¡ intNumber = num1 * num2

— Division /

¡ intNumber = 51 / num2

— Integer Division \

¡ intNumber = 51 \ num2

— Modulus Mod

¡ intNumber = 5 mod 2

— Exponents ^

¡ intNumber = 5^3 ‘5 cubed

Parentheses, Exponents, Multiplication Division Addition Subtraction

Integer and Modular Division

Integer: returns the whole of the division. Example: 89\7= 12

Modular: — returns the remainder of the division. Example: 89/7= 5