Question discussion

Which of the following is the correct expression that evaluates to true if the number x is between 1 and 100 or the number is negative?

312413Medium 1 reply 983 views
22
Which of the following is the correct expression that evaluates to true if the number x is between 1 and 100 or the number is negative?
  • A1 < x < 100 || x < 0
  • B((x < 100) && (x > 1)) || (x < 0)
  • C((x < 100) && (x > 1)) && (x < 0)
  • D(1 > x > 100) || (x < 0)
Correct answer: B

Discussion 1

0
CCommunity
((x < 100) && (x > 1)) || (x < 0)