PROGRAM
SIMULATION
QUARTER 4: LESSON 2
OPERATOR
An Operator in a programming
language is a symbol that tells the
compiler or interpreter to perform
specific mathematical, relational
or logical operation and produce
final result.
TYPES OF OPERATOR
ARITHMETIC OPERATORS
• Addition, Subtraction,
Multiplications, Division, and
Modulus
RELATIONAL OPERATORS
• Equal,not Equal, Greater than,
Less than, Greater than or equal
to, and Less than or equal to.
LOGICAL OPERATOR
AND (&&)
OR (||)
NOT (!)
TRUTH TABLE (AND - &&)
TRUTH TABLE (AND - &&)
30 > 29 && TRUE
X==X
15 < 25 && FALSE
X==Y
29 30 && (40- FALSE
2)==(38+2)
((28*1) )&& ((22))&&((4*4)—4))
FALSE
TRUTH TABLE (OR - ||)
TRUTH TABLE (OR - ||)
-2 > -3 || Z==Z TRUE
44 < 54 || a==b TRUE
16 16 TRUE
16<16 || 16==16 TRUE
TRUTH TABLE (OR - ||)
((2*2) 22 || ((2 3))||((4*4)==4))
TRUE
TRUTH TABLE (NOT - !)
TRUTH TABLE (NOT = !)
!TRUE FALSE
!FALSE TRUE
ACTIVITY 2
THANK YOU AND
GOD BLESS!