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
Continuous data
Elena-2011 [213]

Answer: Could be subdivided into smaller and smaller units.

Explanation:

 The continuous data are basically measured in the small units and can be easily subdivided into smaller parts without changing their actual meaning.

The continuous data also contain numeric value and can be divided into smaller and finer meaningful parts.

The continuous data can be measured according to the precision of the system. The size and volume are the example of the continuous data.

7 0
4 years ago
Adassadad saflalfaklfajfklajfalkfjalkfjalkfalkf
BlackZzzverrR [31]

Answer:

this belongs on r/ihadastroke

Explanation:

5 0
3 years ago
Read 2 more answers
Write a program that accepts a whole number as
SashulF [63]

This is for Python

number = int(input('Number: '))

number = number * 12

print(number)

3 0
3 years ago
Why was unicode invented
Luden [163]
Uni code is short for universal code , it was created so that all countries could communicate together without the need for special encoding for each country
7 0
3 years ago
Tech A states that batteries have different sizing and configuration requirements. Tech B states that this helps them to fit the
Ymorist [56]

Answer:

Both

Explanation:

Batteries come in different sizes and configurations. This is evident in car batteries where third sizes vary from car to car depending on the space and manufacturer's discretion.

Thus, Both technicians are correct.

Cheers

3 0
4 years ago
Other questions:
  • Which windows tool is used to determine if a dynamic disk is corrupted?
    6·1 answer
  • Less than 40 percent of teens have used marijuana within the past year. True or false?
    8·1 answer
  • Mirrors on cars exist to____.
    7·2 answers
  • Use the RSA cipher with public key n = 713 = 23 · 31 and e = 43. Encode the word "KING" into its numeric equivalent and encrypt
    15·1 answer
  • Which of the following Office Online apps is most effective for creating multi-media presentations
    15·1 answer
  • The two principal catalysts for the Information Age have been:________.
    15·1 answer
  • 8. A sprite is a simple spider shaped thing with n legs coming out from a center point. The angle
    10·1 answer
  • True or False The two types of general construction projects are residential for homes or dwellings and commercial for a commerc
    7·1 answer
  • You want to find the distance between two points.
    8·1 answer
  • Areas on which the development of the computer as a communication technology is based
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!