Given the values of x ,y and z, evaluate the following (Answer in true / false):
(x>=y) || (! (z==y) && (z<x))
a) x=10, y=5, z=11
b) x=9, y=10, z=2
and plz tell how you solved it.
Answers
Answered by
3
Answer:
a) true
b)false
please follow
Answered by
6
Solution To Question 1:
Given:
- x = 10
- y = 5
- z = 10
So,
(x>=y) || (!(z==y) && (z<x))
= (10>=5) || (!(10==5) && (10 < 10))
= True || (!False && False)
= True || (True && False)
= True || False
= True (See the Truth Table)
Solution To Question 2:
Given:
- x = 9
- y = 10
- z = 2
So,
(x>=y) || (!(z==y) && (z<x))
= (9>=10) || (!(2==10) && (2<10))
= False || (!True && True)
= False || (False && True)
= False || False
= False
Answer:
- True
- False
Truth Table:
•••♪
Similar questions