Question
Assume you have access to two boolean variables, isSnowing, and isRaining, and one double variable, temperature. isSnowing is true when it's snowing and false otherwise,
Assume you have access to two boolean variables, isSnowing, and isRaining, and one double variable, temperature. isSnowing is true when it's snowing and false otherwise,
isRaining is true when it's raining and false otherwise, and temperature gives the outdoor temperature in degrees Fahrenheit. Write code that prints Let's stay home." if it's raining, snowing, or below 50 degrees Fahrenheit (10 degrees Celsius), and prints Let's go out!" otherwise.
Starting code:
//Assume these can have any value:
boolean isSnowing = false;
boolean isRaining = true;
double temperature = 60.0;
//TODO: print "Lets stay home." if its raining, snowing or
//below 50 degrees and print "Lets go out!" otherwise.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started