Daniel Santos

Sample Of Math with Operators

intNumber = num1 + num2

List Of All The Math Operators

Addition +

—Subtraction –

—Multiplication *

—Division /

—Integer Division \

—Modulus Mod

Exponents ^

What is Regular Division?

—Regular division

Rounds the decimal portion if assigned to an integer.

This is the division with which you are most familiar.

What is Integer Division?

—Integer division

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


intNumber = 51 \ num2

What is Modular Division?

—Modulus division

returns the remainder resulting form the division (mod)


intNumber = 5 mod 2

Order of Operation;

P ~ parantheses

E ~ exponents

M ~ multiplication

D ~ division

A ~ addition

S ~ subtraction