Answer:

The whole expression will be false, because && combines two falses into false.

flour >= 4 && sugar >= 2
 ---------       --------
   false   &&    false
      ---------------
          false 

Cookie Calculator

Here is a simulation of the cookie program. It is written in JavaScript (which is different from Java, but close). Use only integers as input.


How much flour do you have? 

How much sugar do you have? 

if ( flour >= 4 && sugar >= 2 )
  System.out.println( "Enough for cookies!" ); 
else
  System.out.println( "sorry...." );           
  

Try the program out with various values of flour and sugar to check that you understand how AND works.

QUESTION 6:

Try the program with exactly enough flour and sugar. Can you bake cookies?