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
julsineya [31]
3 years ago
11

Create a program to deteate a program to determine whether a user-specified altitude [meters] is in the troposphere, lower strat

osphere, or upper stratosphere. The program should include a check to ensure that the user entered a positive value less than 50,000. If a nonpositive value or a value of 50,000 or greater is entered, the program should inform the user of the error and terminate. If a positive value
Computers and Technology
1 answer:
allsm [11]3 years ago
8 0

Answer:

#include <iostream>

using namespace std;

int main()

{

   float altitude;

   cout<<"Enter alttitude in meter";

cin >>altitude;

if(altitude<0 || altitude > 50000)

{

   cout<<"Invalid value entered";

   return 0;

}

else{

   if(altitude<= 10000)

   {cout <<"In troposphere "<<endl;}

   

   else if(altitude>10000 && altitude<=30000)

   {cout <<"In lower stratosphere"<<endl;}

   

   else if(altitude>30000 && altitude<=50000)

   {cout <<"In upper stratosphere"<<endl;}

   

}

   return 0;

}

Explanation:

Define a float type variable. Ask user to enter altitude in meters. Store value to altitude variable.

Now check if value entered is positive and less than 5000,if its not in the range of 0-50,000 display a termination message and exit else check if it's in less than 10000, in between 10000 and 30000 or in between 30000 and 50000.

10,000 is above sea level is troposphere.

10,000-30,000 is lower stratosphere.

30,000-50,000 is upper stratosphere.

You might be interested in
To convince the server that a user is authentic, the authentication server creates a _________ that contains the user's ID and n
Rasek [7]

Answer: ticket

Explanation

6 0
3 years ago
Which of these reduces friction and makes the job of moving a freezer easier?
laila [671]
Using a hand truck to move the freezer would make it easier and remove the element of friction between the freezer and the floor 100%
6 0
2 years ago
The entities on which data are collected are _____.
sasho [114]

Answer:

<h2>ELEMENT</h2>

Explanation:

<h3>hope it helps you!!!</h3>
8 0
2 years ago
PLEASE HELP!!!!!!!!!!!
Dafna1 [17]
I'd say Davis was trying to increase persuasive power. Given that he saw that nobody was really his friend because he was shy and quiet, he tried to persuade people to like him by going to the game and hanging out with people. 
4 0
3 years ago
Read 2 more answers
____ is the security guarantee that people who intercept messages cannot read them. A. Availability B. Encryption C. Confidentia
Anni [7]

Answer:

C. Confidentiality

Explanation:

With confidentiality, a person who intercepts messages you intend to remain private cannot read them and thus increases your document protection

8 0
2 years ago
Other questions:
  • Abigail is interested in connecting her tablet that usually connects to a wireless network, to her personal computer that usuall
    11·2 answers
  • If a class has member variables that are pointers, you must ensure that you implement ____.
    6·1 answer
  • High quality pages in a task should all get the same Needs Met rating. For example, a high quality page for a common interpretat
    9·1 answer
  • In this program, you will create an object and display it. Create a class nerf Gun that includes data members model (string), ra
    5·1 answer
  • The method main of a class is called when you instantiate an object of that class like this: Box myBox = new Box();
    9·1 answer
  • In which of the following situations may the taxpayer take an education expense on Schedule C? a. Henry, a self-employed adminis
    7·1 answer
  • A _____ is usually a smaller version of a data warehouse
    7·1 answer
  • Swapping two input integers if they are not the same. (use switch-case
    10·1 answer
  • An article explaining the uses of the parts of a computer​
    14·1 answer
  • Mississippi law codes state that bullying and cyberbullying are against the law. A court can decide to incur ___________________
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!