Arithmetic Operators

Operation

Description

Example

Operation

Description

Example

+

Addition

myvar2 = myvar + 1

–

Subtraction

myvar2 = myvar -- 1

–

Negation

myvar2 = -myvar

*

Multiplication

myvar2 = myvar * 10

/

Division

myvar2 = myvar / 10

%

Modulo (remainder from division)

myvar2 = 47 % 10(this assigns 7 to myvar2)

^

Exponentiation

myvar2 = 2^5(this is 2 to the power 5, or 32)

Â