1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
DIA [1.3K]
3 years ago
13

Write switch-case statement that displays the following information if the temperature is the input Activities at Lake LazyDays

program: As activity directory at Lake LazyDays Resort, it is your job to suggest appropriate activities to guests based on the weather: temp p-80: swimming 60 temp 80: tennis 40 temp <60: golf temp< 40: skiing
Computers and Technology
1 answer:
Marta_Voda [28]3 years ago
3 0

Answer:

//here is code in c++.

#include <bits/stdc++.h>

using namespace std;

int main()

{

// variable

int temp;

cout<<"Please enter the temperature:";

//read temperature from user

cin>>temp;

int n;

// reduce the case for switch

n=temp/10;

// print output according to the switch case

switch (n) {

case 7:

case 6:

cout<<"tennis"<<endl;

break;

case 5:

case 4:

cout<<"golf"<<endl;

break;

default:

if(temp>=80)

cout<<"swimming"<<endl;

else

cout<<"skiing"<<endl;

break;

}

return 0;

}

Explanation:

Read the value of temperature from user and assign it to variable "temp".

Calculate n=temp/10, to limit the number of cases in the switch statement.

if temperature is greater or equal 60 & less than 80, it will print "tennis".

If temperature is greater or equal 40 & less than 60, it will print "golf".

in default case, if temperature is greater than 80, it will print "swimming".

if less than 40, print "skiing".  

Output:

Please enter  the temperature::67                                                                                        

tennis

You might be interested in
Which of the following are advantages of cloud computing?
Leona [35]
Hahahahaha lawllakad
7 0
3 years ago
Read 2 more answers
What is a computer software?​
Fofino [41]

Answer:

Software, instructions that tell a computer what to do The term was coined to differentiate these instructions from hardware  the physical components of a computer system.

Explanation:

6 0
2 years ago
Read 2 more answers
What is the likely long-term consequence of an increase in the relative percent of greenhouse gases in Earth’s atmosphere?
NemiM [27]

Answer:

Earth's average temperature will increase.

Explanation:

5 0
3 years ago
A leading pharmaceutical company is launching a major transformation of its entire Cloud operations in order to more quickly and
klasskru [66]

This is a great move for the Pharmaceutical company for a number of reasons.

  • The first and perhaps most important advantage is to the company is that costs relating to Information and Technology (IT) Infrastructure will be reduced to the barest minimum. As a start-up, it is important to keep costs as low as possible. Costs are kept low because the organization will not need to pay the added energy and personnel-related costs of maintaining an elaborate IT infrastructure.

  • The advantage of scalability. Scalability in this sense simply means the ability to take on additional workload or adjust to market demand. As the company grows and attracts more clients, it would need to expand beyond the capacity that it had at the onset. Opting for Cloud as a Service (CaaS) gives them this advantage.

  • Another way CaaS can help the client is that they enjoy the advantage of Business Continuity. Business Continuity is the ability to remain in business regardless of disruptions to the business itself at one location. This is because CaaS providers are structured in such a way that they are able to keep their subscribers in operation regardless of any disasters.

Other advantages to this client are:

  1. Ease and access of automatic updates to the system;
  2. Ease of collaboration between internal and external users of the same system.

Learn more about the merits of Cloud as a Service here:

brainly.com/question/24705780

4 0
2 years ago
Which tool should you use to modify firewall rules on a windows server?
vovikov84 [41]

Click Tools and select Windows Firewall with Advanced Security. Review the current configuration settings by selecting Windows Firewall Properties from the MMC landing page. You can access and modify the settings for each of the three firewall profiles, Domain, Private, and Public, as well as IPSec settings.

3 0
3 years ago
Other questions:
  • A __________ is the column of data in a database that is used as the basis for arranging data.
    8·2 answers
  • Jakob is stuck in the airport on a long layover while traveling for work. He sees two Wi-Fi’s he can log onto: one says Airport
    7·2 answers
  • Which of the following is not a true statement about Christopher Columbus it oko
    15·1 answer
  • Write a Java test program, named TestGuitar, to create 3different Guitars representing each representing a unique test case and
    8·1 answer
  • Write a program that reads numbers from scanf (keyboard) and then sums them, stopping when 0 has been entered. Construct three v
    13·1 answer
  • Which is the most common way to install memory in a laptop?
    14·1 answer
  • You can minimize the Ribbon with a command contained on the _____.
    7·1 answer
  • Which of the following is an online library?
    8·2 answers
  • Why does this website have so many copies of plagiarism?
    5·1 answer
  • Ignore this it a temporary note for me: SPSstudents
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!