A good answer might be:

The logical expression is true.

34 > 2   ||   5 == 7
------        -----
 true         false
   --------------
       true

because all OR needs is one true.

Try the Program Yourself

Here is a version of the car credit program. It is written in JavaScript so the input is from the web browser window, not from the DOS window. The statements in the true branch and the false branch are different than in the original program, because output is to a "text box" in the browser window.


How much cash?           

How much credit do you have? 

  if ( cash>=25000 || credit>=25000 )
    input_form.answer.value = "Enough to buy this car!"
  else
    input_form.answer.value = "Have you considered a Yugo?"
  


Try the program out with various values of cash and credit to check that you understand how OR works.

QUESTION 18:

What does the program do if the user enters negative numbers?