Question

Translate this statement into Java: If the value of temperature is in between 20.0 and 40.0, print very cold if ( (tempera
0 0
Add a comment Improve this question Transcribed image text
Answer #1

1.. if (! (temperature < 20.0 || temperature > 40.0)

system.out.println("very cold");

As value should be between 20.0 to 40.0

<= is used when the value should be equals to and less/greater then is applicable.i.e in both the scenario.

Add a comment
Know the answer?
Add Answer to:
Translate this statement into Java: "If the value of temperature is in between 20.0 and 40.0,...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
Active Questions
ADVERTISEMENT