Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

As activity directory at Lake LazyDays Resort, it is your job to suggest appropriate activities to guests based on the weather: temp > = 8

As activity directory at Lake LazyDays Resort, it is your job to suggest appropriate activities to guests based on the weather:
temp >=80: swimming
60<= temp <80: tennis
40<= temp <60: golf
temp <40: skiing
1. Write a program that prompts the user for a temperature, then prints out the activity appropriate for that temperature. Use
a cascading if, and be sure that your conditions are no more complex than necessary.
2. Modify your program so that if the temperature is greater than 95 or less than 20, it prints Visit our shops!.(Hint: Use
a boolean operator in your condition.) For other temperatures print the activity as before.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions

Question

Which security solution should you use to meet requirement C?

Answered: 1 week ago