Question: Write an if-else statement that assigns 1 to x when y is equal to 100. Otherwise, it should assign 0 to x.
Write an if-else statement that assigns 1 to x when y is equal to 100. Otherwise, it should assign 0 to x.
Step by Step Solution
3.40 Rating (159 Votes )
There are 3 Steps involved in it
x y 100 1 0 The ternary expression y 100 1 0 can be read as if y is equal to ... View full answer
Get step-by-step solutions from verified subject matter experts
