arithmetic operator

17
Arithmetic Operator Prepared by: Jordan Delacruz Rona Mae Dominguez

Upload: jordan-delacruz

Post on 22-May-2015

1.182 views

Category:

Technology


1 download

DESCRIPTION

Arithmetic operations reviewer!

TRANSCRIPT

Page 1: Arithmetic operator

Arithmetic Operator

Prepared by: Jordan Delacruz Rona Mae Dominguez

Page 2: Arithmetic operator

The operators are symbols which take one or more operands or expressions and carry out arithmetic or logical calculations.

Operators

Arithmetic operator

Relational operator

Logical Operator

Assignment Operator

Conditional Operators

Increment & Decrement Operators

Bitwise operators Special operators

Page 3: Arithmetic operator

Arithmetic Operators

Operators that represent mathematical operations which perform numeric computations, for example, adding two numbers or raising the elements of an array to a given power.

Page 4: Arithmetic operator

+ Operator

The addition operator is used to calculate the sum of two numbers.

Page 5: Arithmetic operator

Example

10 20Operand 1 Operand 2

30

Operator

Output

Page 6: Arithmetic operator

- Operator

The subtraction operator is used to find the difference between two numbers or to indicate the negative value of a numeric expression.

Page 7: Arithmetic operator

Example

8 1Operand 1 Operand 2

7

Operator

Output

Page 8: Arithmetic operator

Example

8Negatio

n

Page 9: Arithmetic operator

* Operator

The multiplication operator is used to calculate the product of two numbers.

Page 10: Arithmetic operator

Example

8 8Operand 1 Operand 2

64

Operator

Output

Page 11: Arithmetic operator

/ Operator

The division operator is used to calculate the quotient of two numbers.

Page 12: Arithmetic operator

Example

8 4Operand 1 Operand 2

2

Operator

Output

Page 13: Arithmetic operator

^ Operator

The exponentiation operator raises a number to the power of an exponent.

Page 14: Arithmetic operator

Example

8 2Operand 1 Operand 2

64

Operator

Output

Page 15: Arithmetic operator

% Operator

The modulus operator divides two integers and returns the integer remainder.

Page 16: Arithmetic operator

Example

8 5Operand 1 Operand 2

3

Operator

Output%mod

Page 17: Arithmetic operator

Summary