integer x = 5, y = 4, Z
Z= x>y? X-y x + y
print z
Answers
Answered by
26
Answered by
0
Answer:
Z = 1
Explanation:
Given:- x=5, y=4
Z = x > y? x-y: x+y
To Find:- Z.
Solution:- x = 5, y = 4
Here, ternary operator is being used.
So, if the condition is true the expression after the "?" is executed.
As 5 > 4 = true.
So, x - y = 5 - 4 = 1
#SPJ2
Similar questions
Math,
1 month ago
World Languages,
3 months ago
Geography,
3 months ago
Biology,
10 months ago
Biology,
10 months ago