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
GIVING BRAINLIEST
irakobra [83]

Answer:

A: Radio waves.

Explanation:

Computers use short-wave radio in order to communicate with devices in it's immediate vicinity.

8 0
2 years ago
When using the red / yellow I green method to present status of a project, green can mean which of the following?
Temka [501]

Answer:

D. All of these

Explanation:

I hope this helps you! Have a great day!

bren~

3 0
2 years ago
Read 2 more answers
A college student needs a laptop that can be used while committing on the train and sitting in a lecture
Westkost [7]
You could get a laptop for like 200 that could run well and enough space for stuff.
4 0
3 years ago
Your license can be canceled if you __________
Elena L [17]
Its B i think hope this helps ! 
8 0
3 years ago
Read 2 more answers
The ease of travel in the twentieth century played a role in the advancement of medicine. Based on this lesson, which statement
Shtirlitz [24]
During the twentieth century, transportation had been very significant and played a great influence in the advancement of medicine. This is because this made health care become more accessible to patients no matter where they are located. The answer for this would be option C.
8 0
3 years ago
Read 2 more answers
Other questions:
  • select three types of school which specifically emphasize learning through creativity, self expression, and play
    10·2 answers
  • Due to the internal style sheets of some browsers, your website may look different to someone who is using firefox as opposed to
    11·1 answer
  • The critical path of a network is the A. shortest time path through the network. B. path with the most activities. C. longest ti
    8·1 answer
  • The ability to learn a new computer software program is to ____________ as knowledge of state capitals is to _____________.
    11·1 answer
  • Write a program in python that ask the user to enter a word and then capitalizes every other letter of that word
    15·1 answer
  • What’s good and bad about having social media?
    14·2 answers
  • What is a help desk
    15·1 answer
  • Please choose odd one out please tell fast ​
    13·2 answers
  • 8.6 Code Practice: Question 2
    7·1 answer
  • Which of the examples is part client side code
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!