Say that you enter 56000 for CASH and 0 for CREDIT
.
CASH >= 25000 true CREDIT >= 25000 false
Here is the program again:
' Car purchase tester ' PRINT "Enter cash" INPUT CASH PRINT "Enter credit" INPUT CREDIT IF CASH >= 25000 OR CREDIT >= 25000 THEN PRINT "Car Purchase Approved!!" ELSE PRINT "purchase rejected" END IF ' END
For you to have enough to buy the car,
JUST ONE relational expression must be TRUE.
With enough cash you can buy the car, no matter what your credit.
With enough credit you can buy the car, no matter how much cash.
The OR
checks that at least one of
CASH >= 25000 CREDIT >= 25000
are true before the entire question is true. The entire question must be true in order for the true block to execute.
Look at the program. How will the monitor screen look
if the user types 50000 for CASH
and 75000 for CREDIT
?