Computer Science, asked by sneh3818, 1 month ago

What result will be produced by the expression X+Y>1700?200:400,If
(i) X=2000 and Y=1000
(ii) X=1000 and Y=50

Answers

Answered by ItzBrainlyQueen01
0

Explanation:

\huge\color{cyan}\boxed{\colorbox{black}{Answer : -   }} \\

1. If X = 2000 and Y = 1000

{\bold{\sf{➠ \:  \:  \:  \:  \:  X  \: + \:  Y  \: > \:  1700  \: ?  \: 200 \:  :  \: 400}}} \\

{\bold{\sf{➠  \:  \:  \:  \:  \: 200}}} \\

{\large{\underline{\rm{Explanation  \: :}}}} \\

If X = 2000 and Y = 1000 then (X + Y) is definitely greater than 1700 i.e. statement is true then it should put the left value in the output which is 200

2. If X = 1000 and Y = 50

{\bold{\sf{➠  \:  \:  \:  \:  \: X  \: + \:  Y  \: > \:  1700 \:  ? \:  200 \:  :  \: 400}}} \\

{\bold{\sf{➠  \:  \:  \:  \:  \: 400}}} \\

{\large{\underline{\rm{Explanation \:  :}}}} \\

If X = 1000 and Y = 50 then (X + Y) is 1050 which is absolutely smaller than 1700 i.e. the given statement is false then it should put the value given in right which is 400

Similar questions