Basic Math Operators

By: Mark Serna

Basic Math Operators

+ (Add)

- (Subtract)

/ (divide)

* (multiply)

^ (Exponents)

Samples of Math with Various Operators

Addition (+) - intNumber=num1+num2

Subtraction (-) - intNumber=num1-50

Multiplication (*) - intNumber=num1*num2

Division (/) - intNumber=51/num2

Integer Divison (\) - intNumber=51\num2

Modulus Mod - intNumber=3 mod 2

Exponents (^) - intNumber=6^2 '6 squared

They Really WORK!

Divion Operators

What is regular Division?

Answer: Rounds the decimal portion if assigned to an integer ; This is the division with wich you are most familiar

What is Integer Division? Give an Example

Answer: cuts off the decimal portion and returns the integer (\)

What is Modular Division? Give an Example

Answer: returns the remainder resulting form the division (mod)

Math Operators


List the operators of operations

P (parenthesis)

E (exponents)

M (multiplication)

D (divison)

A (addition)

S (subtraction

= Please excuse my dear aunt sally