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?
```
a. 1 < x < 100 && x < 0
b. ((x < 100) && (x > 1)) || (x < 0)
c. ((x < 100) && (x > 1)) && (x < 0)
d. (1 > x > 100) || (x < 0)
```
```
b. ((x < 100) && (x > 1)) || (x < 0)
```
A and D have syntax errors. B uses || for the OR operator. The correct answer is B.
Computer Science & Information Technology
You might also like to view...
A report created using the Report Wizard first displays in Print Preview
Indicate whether the statement is true or false
Computer Science & Information Technology
Banks measure ________, or potential losses, when assessing a corporate loan
Fill in the blank(s) with correct word
Computer Science & Information Technology