Fill the blank so that weight is tested in two ways:

Answer:

    // check that the weight is within range
    if ( weight >= 136 && weight <= 147 )
      System.out.println("In range!" );
    else
      System.out.println("Out of range." );

A Run of the Program

The boxer must weigh enough (weight >= 136), and must also not weigh too much (weight <= 147). The results of the two tests are combined with the and-operator, &&. Here is a JavaScript version of the program:


How heavy is the boxer? 

  


QUESTION 10:

Run the program for a weight of 140.