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
Tom [10]
3 years ago
10

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:
nordsb [41]3 years ago
3 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
Provide an example of a time in your personal or work life when you used the household measuring system and measured out an exac
Svetach [21]

Answer:

Cooking

Explanation:

Cooking and baking would be the easiest answer to come up with. It's the most practical thing that you would be measuring liquids and solids for. For example, you should measure how much water or flour you use when making food. Try and think of a time you may have used a measuring cup of some sort.

8 0
2 years ago
What the gas line in the car
inn [45]

It’s a pipeline to transport natural gas.

3 0
3 years ago
In QBasic, create a number guessing challenge. Your program should generate a random number from 1-
Sergio039 [100]

Answer:

yes

Explanation:

6 0
2 years ago
What is a digital certificate? Select one: a. It is a means of establishing the validity of an offer from a person, entity, web
a_sh-v [17]

Option D is the answer because Digital Certificate is an entity that generates electronic and distributes them upon proving their identity sufficiently. In early days there was issues with people using the certificates that were not even issued by the organizations. Today it's a cryptographic technique which uses digital signatures and gives users a digital certificate that can be authenticated anytime online by any organization and is unique for every user having it.

Option A cannot be the answer because it has nothing to do with the identity of person but rather it is for specific fields.

Option B is not answer because it has no key and score matter to do with it.

Option C Web transactions has nothing to do with the certificates.

8 0
3 years ago
If you use your smartphone as a hotspot to connect to the Internet on your tablet you are using a ________.quillet
Nataly [62]
Personal Area Network
7 0
2 years ago
Other questions:
  • Amanda, a project manager, conducted a team meeting consisting of testing and development team. She insisted on clear communicat
    11·1 answer
  • )a___ is a complete binary tree such that each node in the tree contains a comparable object that us greater than or equal to th
    9·1 answer
  • If you are driving at night, you should not use high-beam headlights within _________ of oncoming vehicles. Florida Road Rules 4
    9·2 answers
  • Forensic computer investigators must _____.
    6·2 answers
  • The physical parts or components of a computer system is called?
    8·2 answers
  • A file name extension provides what information about a file?
    6·1 answer
  • A single-user/single-tasking operating system allows only one user to perform one task at a time. A real-time operating system g
    13·1 answer
  • I need a Python program that will read a data file, perform an analysis, and write the results to a separate file with a .txt ex
    15·2 answers
  • Every single device can be connected to every other device on network, making the network mesh. This statement is True or False?
    8·1 answer
  • RTOS stands for ______ Time Operating System.
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!