Math Operators

Justin Austin 12/12/12

Basic Operations

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

exponets ^

intNumber = 5^3

Types of Division

  • What is Regualr Division? You're dividing normally (traditional)

  • EX: 9/2=4.5
  • What is Integer Division? Divide normally but only list the whole number found
  • 72\5= 14.4
  • What is modular Division? Divide normally but only list the decimal found, if no decimal then put a 0
  • 25 mod 8 = 1

Order of Operations

What does PEMDAS stand for?

  1. Parentheseis
  2. Exponets
  3. Multiplication
  4. Division
  5. Addition
  6. Subtraction