expand icon
book Programming Logic and Design, Introductory 7th Edition by Joyce Farrell cover

Programming Logic and Design, Introductory 7th Edition by Joyce Farrell

Edition 7ISBN: 1285225562
book Programming Logic and Design, Introductory 7th Edition by Joyce Farrell cover

Programming Logic and Design, Introductory 7th Edition by Joyce Farrell

Edition 7ISBN: 1285225562
Exercise 33

If sales = 100, rate = 0.10, and expenses = 50, which of the following expressions is true?

a. sales >= expenses AND rate < 1

b. sales < 200 OR expenses < 100

c. expenses = rate OR sales = rate

d. two of the above

Step-by-step solution
Verified
like image
like image

Step 1 of 2

Valid Expressions

If the expression sales >= expenses is evaluated, it givens the true value when sales is 100 and expenses is 50. The expression rate < 1 is evaluated; it gives the true value when rate is 0.10. So the expression sales >= expenses AND rate < 1 is true.

If the expression sales < 200 is evaluated when the values of sales is 100, it gives the true value and then the expression expenses < 100 also gives true value when the value of expenses is 50. So the expression sales < 200 OR expenses < 100 is true value.

Hence the two expressions given in the options (a) sales >= expenses AND rate < 1 and (b) sales < 200 OR expenses < 100 are true.

Therefore the correct option is (d) two of the above .


Step 2 of 2

close menu
Programming Logic and Design, Introductory 7th Edition by Joyce Farrell
cross icon