Basic Math Operators

Learn them! Conner Suchonic

Symbols

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

Examples

Addition= X + X

Subtraction= X - X

Multiplication= X x X

Division= X/X

Integer Division= X/X

Modulus Division= X mod X

Exponents= X^X 'X cubed


Big image

P.E.M.D.A.S.

Parentheses (Please)

Exponents (Excuse)

Multiply (My)

Divide (NOTE: Division will be complete in the order in which it appears in the problem, no ranking with division types.) (Dear)

Add (Aunt)

Subtract (Sally)

What ARE the Division-types, anyways?

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. 5/2= 2


Modular Division- returns the remainder resulting form the division (mod) Ex. 73 mod 9= 1