// Boolean variables // Check whether the temperature is between 62 and 80 // and print OK. import java.util.*; public class ComplexIf2 { public static void main(String[] args) { Scanner console = new Scanner(System.in); System.out.print("Enter temperature: "); int temp = console.nextInt(); boolean tooLow, tooHigh; tooLow = temp < 62; tooHigh = temp > 80; if (!tooLow && !tooHigh) { System.out.println("OK"); } if (tooLow || tooHigh) { System.out.println("Not OK"); } } }