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
Mrac [35]
3 years ago
13

Decide what activity is most appropriate based on the temperature. If the temperature is greater than 80 degrees, then display t

he message "Go swimming." If the temperature is between 60 and 80 degrees, display the message "Go biking". If the temperature is less than 60 degrees, display the message "Go for a walk". The input will be the temperature.

Computers and Technology
1 answer:
Ede4ka [16]3 years ago
6 0

Answer:

Here is the C++ program:

#include <iostream> //to use input output functions

using namespace std; //to access objects like cin cout

int main(){// start of main function

   int temp; //declare a variable to store value for temperature

   cout<<"Enter temperature: "; //prompts user to enter temperature

   cin>>temp; //reads value of temp from user

   if(temp>80) //if temperature is greater than 80 degrees

     { cout<<"Go swimming";    } //displays Go swimming

   else if(temp<=80&&temp>=60) //if temperature is between 60 and 80

         {   cout<<"Go biking";    } //displays Go biking

   else //if temperature is less than 60 degress

   cout<<"Go for a walk"; } //displays Go for a walk

Explanation:

The program prompts the user to enter value of temperature. It stores the value of temperature in temp variable. Then the first if condition checks if the value of temp is greater than 80. If it evaluates to true, then the print statement inside the body of this if statement executes which is "Go swimming". If this condition evaluates to false then program moves to the else if condition which checks if the value of temp is between 60 and 80. There is a logical operator AND (&&) is used between both expressions to check temperature between two ranges. If it evaluates to true, then the print statement inside the body of this if statement executes which is "Go biking". If this condition evaluates to false then program moves to the else part which has a print statement that displays "Go for a walk" on output screen. The screenshot of program along with its output is attached.

You might be interested in
Item 19 A student pushes a box across a rough horizontal floor. If the amount of work done by the student on the box is 100 J an
tatiyna

Answer:

60 J

Explanation:

Given,

Work done to push the box = 100 J

Energy dissipated by friction = 40 J.

According to work energy theorem work done is equal to change in kinetic energy.

Change in Kinetic energy = Work done by student + Work done by friction

Change in Kinetic energy = 100 J - 40 J

Work done by the friction will be negative because it will act in opposite direction of force applied.

Change in Kinetic energy = 60 J

4 0
4 years ago
What are the positive impact of computer in society
Brrunno [24]

Answer:

we can communicate many peoples

8 0
3 years ago
can you pls sub to my youttube channel, its called Yakobu, pls i will give you 30 points. pls dont just take points and not sub.
xxMikexx [17]

Answer:

Sure

Explanation:

I would love 2

5 0
3 years ago
How can you make your web page accessible to anyone in the world?
GarryVolchara [31]

Answer:

Choose a content management system that supports accessibility.

Use headings correctly to organize the structure of your content.

Include proper alt text for images.

Give your links unique and descriptive names.

Use color with care.

Design your forms for accessibility.

8 0
3 years ago
For problems 14 – 21 determine all the roots of the given function.
lesya [120]
What’s the problem ?
7 0
3 years ago
Read 2 more answers
Other questions:
  • 14. Emelia is very concerned about safety and has conducted a study to determine how many bike helmets were replaced at each loc
    13·2 answers
  • When might it be necessary or advisable to write a shell script instead of a shell function? give as many reasons as you can thi
    15·1 answer
  • A good place to get hints about how to answer a response question could be a. Your teacher c. Both of these b. The rest of the t
    13·2 answers
  • Which of the following commands would instruct OSPF to advertise ONLY the 192.168.10.0/24 network in Area 0?
    13·1 answer
  • Write a program that displays a menu allowing the user to select air water, or steel. After the user has made a selection, the n
    10·1 answer
  • Write a for loop to print all elements in courseGrades, following each element with a space (including the last). Print forwards
    10·1 answer
  • What is the FTC used car rule
    12·1 answer
  • The Relation below stores information about weather observations made in the Albany area. You can assume that there are many obs
    5·1 answer
  • Which of the following can help organize your email messages? Select all that apply.
    13·2 answers
  • What's the use of computer?Where are they used?​
    6·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!