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
Privacy Group of answer choices must be respected if we are to function as complete, self-governing agents is an absolute value
ElenaW [278]
Privacy group in article 3 in constitution section 3 too
8 0
2 years ago
The BCD number for decimal 473 is( ). a) 111011010; b) 010011110011; c) 010001110011; d)0010110110​
jek_recluse [69]

Answer:

001101000111 is the bcd no for 347

8 0
2 years ago
What is a distraction that you find when photographing animals at the zoo
yaroslaw [1]

D. All of the above.

<u>Reason:</u>

A. Fences can get in the way of a beautiful picture.

B: The animal's enclosure may be hard to get the perfect snap. Like a rock can be in the way of the animal. idk...lol

C. People want to see the animal as much as you do so they may block the way of a picture.

Example from Google..XD


7 0
3 years ago
The kitchen in any café is a noisy place. To make sure the orders which you have carefully written down on your notepad make it
Levart [38]

Answer:

file_name = 'orders.txt'

file_obj = open( file_name, 'r' )

lines = file_obj.read()

print(lines.upper(), end = '')

Explanation:

  • Define the name of the file .
  • Use the built-in open function to open the file in read mode .
  • Use the built-in read function to read the file and assign this to lines variable.
  • Finally display the lines by converting them to capital alphabets by using the built-in upper() function.
5 0
3 years ago
On a Linux system it is considered bad manners to create files and folders in the _______________ directory.
guapka [62]

Answer:

Root

Explanation:

Linux is an open source operating system which receives command from the user and communicates with the hardware, and in Linux the root directory is the top level directory that contains all other directory, it is not recommended to create files and folders in  the root directory because the commands the user enters may change files that the operation system may depend on for usage.

5 0
3 years ago
Other questions:
  • The _____ is the area in Microsoft Excel where you can perform file commands such as Save, Open, and Print
    15·1 answer
  • Can anyone help me with getting bash ubuntu on windows setup?
    15·1 answer
  • "In an artificial neural network, what input values will cause the neuron below to produce an output of 1". Group of answer choi
    12·1 answer
  • An example of a current disruptive technology is a?
    8·2 answers
  • What is the best way to protect computer equipment from damage caused by electrical spikes
    15·1 answer
  • Componets of computer
    5·1 answer
  • HELP
    11·1 answer
  • This is your data.
    11·2 answers
  • Which of the following statements tests if users walked 10,000 or more steps and ate fewer than 25 grams of sugar?
    9·1 answer
  • Describe the differences and similarities between the most common operating systems used for Mac, PC, and Linux in
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!