// Complex if statements // Check whether the temperature is between 62 and 80 // and print OK. import java.util.*; public class ComplexIf1 { 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 (!(temp < 62) && !(temp > 80)) { System.out.println("OK"); } if ((temp < 62) || (temp > 80)) { System.out.println("Not OK"); } } }