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 zone of the ocean is deepest ?
AURORKA [14]
If you mean, where is the ocean deepest, the answer is the Marina Trench. It is south of Japan and has the lowest elevation of -11 000 meters
4 0
3 years ago
Read 2 more answers
as a pc technician, you are on the road most of the day and use a laptop. when you get back to your office at the end of the day
natali 33 [55]

Port replicator is the type of device should you choose to provide all the functionality above.

<h3>What does a port replicator do?</h3>
  • A tool used to connect a laptop's accessories rapidly. Permanent connections are made to the port replicator, which is connected to the laptop via the USB port, by the keyboard, mouse, network, monitor, printer, and port.
  • A docking station's functionality may be partially or entirely provided by a port replicator, and the words are interchangeable.
  • However, a port replicator often offers a universal solution for all laptops through USB, in contrast to a docking station that connects to the computer using a proprietary connector. check out docking station.
  • A port replicator is an add-on for a notebook computer that enables many devices, such a printer, big screen, and keyboard, to be attached at once.

Learn more about A port replicator refer :

brainly.com/question/14312220

#SPJ4

4 0
1 year ago
Which of the following is the correct binary representation of the number 2?
dusya [7]

Answer:

10

Explanation:

To convert decimal to binary, you just count like normal, but instead of regrouping when adding 1 when you reach 9, you regroup when you reach 1.

in this case, you would count like this:

0

1

10

7 0
3 years ago
What kind of security features does Microsoft Security Analyzer promise?
Margaret [11]

Answer:

  • Microsoft security analyzer easily update the software system and it a free standalone component which basically provide security to many systems. We can easily update pure system once in a week.
  • Basically, it is a free independent segment which provide the security to many other frameworks. It is used to protect various number of windows against weak passwords by using security scanning.
  • It also check errors in the operating system and provide the security to the file system.
  • It is used to determine the state of security and other specific guidance.

8 0
3 years ago
How have productivity programs improved the professional lives of people? (check all that apply)
Zielflug [23.3K]

Productivity programs improved the professional lives of people because:

  • made it easier and faster to communicate with others
  • made it easier to manipulate numbers in a spreadsheet
  • made it easier and less expensive to present information

<h3>What is productivity?</h3>

Productivity is known to be the level of efficiency in regards to the production of goods or services and it is one that is rated by some measure.

Hence, Productivity programs improved the professional lives of people because:

  • made it easier and faster to communicate with others
  • made it easier to manipulate numbers in a spreadsheet
  • made it easier and less expensive to present information

Learn more about productivity from

brainly.com/question/14262252

#SPJ1

7 0
2 years ago
Other questions:
  • Which wildcat character will return a single character when using the find dialog box
    14·1 answer
  • Tell me about how to build robots
    11·1 answer
  • Two electronics technicians are measuring electrical quantities in circuits. Technician A says that copper, glass, porcelain, an
    11·1 answer
  • Scientific models can be used for a variety of different purposes. Which of the following statements about scientific models is
    7·2 answers
  • Which of the following is considered part of the process in the systems thinking example of a TPS?
    6·1 answer
  • The ____ aggregate function finds the largest value
    10·1 answer
  • Copy the following code and run it. You should break it into the following 3 functions
    6·1 answer
  • Suppose there are two hosts, S and R. They are communicating over a TCP connection, and R has already received from S al bytes f
    11·1 answer
  • Communication protocols, sets of rules agreed to by all parties, are designed in order to:
    15·1 answer
  • What is this line called that appears and disappears in the search box<br><br> WILL MARK BRAINLIEST
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!