csci 8

comparison operators

<

-less than

>

<=

less than or equal to

>=

greater than

==

equal to

!=

not! equal to

always producing a true false

______

X will always be on the left!!

you always test for true or false

__

LOGICAL OPERTAORS

Not! - inverts, returns opposite

AND && -
most be both., links 2 statements into 1

OR ||\

__

WORKED PROBLEMS

8>3 && 3!=4

false true

this is false

t&&t=T

t&&f=f

f&&f=f

!a&&b- truth table

T|T t

T|F f

F|T f

F|F t

!a&&b||a

T|T t

T|F t

F|T t

F|F f