temp >= 80: swimming 60 <= temp < 80: tennis 40 <= temp < 60: golf 20 <= temp < 40: skiingFill in the blanks in the code below as directed in the comments. The if should be a cascading if with conditions that are no more complicated than necessary.
int temp; System.out.println("What's the temperature today?"); temp = scan.nextInt(); // Declare a boolean variable extremeTemp and assign it an // expression that is true when the temperature is greater than 95 or // less than 20 __________________________________________________________________________; // Complete the cascading if (avoid unnecessary comparisons) if (extremeTemp) System.out.println ("Visit our shops!"); else if (temp >= 80) System.out.println("How about a dip in the pool?"); _________________________________ System.out.println("Go grab a racquet!"); __________________________________ System.out.println("It's a perfect day for golf."); __________________________________ System.out.println("Let's hit the slopes!");
!(age >= 65 && income < 20000)
p OR NOT (p OR (p OR q))