In lab we are thinking about #4

class Four {
  public static void main(String[] args) {
    double efficiency = 50; // miles per gallon  
    double fuel = 1.2; // gallons 
    double miles = 100; // miles 
    boolean test = efficiency * fuel >= miles; 
    int n = 1; // n should be 1 if test is false (won't make it)
               // n should be 0 test is true (you will make it!)
    System.out.println(
      "You will " + 
      " not ".substring(5 - 4 * n) + 
      "make it. "
                       ); 
  }
}

Now we need to find a way to turn the test into 0 or 1. 

class Four {
  public static void main(String[] args) {
    double efficiency = 50; // miles per gallon  
    double fuel = 1.2; // gallons 
    double miles = 10; // miles 
    
    double x = - efficiency * fuel + miles; 

    int n = (int) Math.round( (x + Math.abs(x)) / (2 * x) ); 
    // x is miles I can't cover. If x >= 0 n is 1. 
    
    System.out.println(
      "You will " + 
      " not ".substring(5 - 4 * n) + 
      "make it. "
                       ); 
  }
}