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
you want to run your campaign for your dry-cleaning service across three different publishers, each with different video creativ
olganol [36]

The publisher, the user, and the ad server are all involved in the third-party ad serving (3PAS) paradigm of ad delivery.

Instead of serving an ad directly to the user's browser, the publisher instead sends the browser to an ad server where the ad is saved via an ad tag. Companion banners are image advertisements that play concurrently with other video or audio advertisements. In audio advertising, companion banners are shown to viewers as your audio ad is playing on a screen-equipped device, such as a smartphone or a computer. Go to your creative properties and open the Companion Creatives section. Select Add companions from the drop-down menu. You can add new creatives or assign already-existing ones.

Learn more about browser here-

brainly.com/question/28504444

#SPJ4

6 0
1 year ago
Five year ago, Amit was three times as old as Arman. Ten years later Amit would be twice as old as Arman. How old is Arman now? 
RideAnS [48]
Answer: 50
Explanation: let amit's current age = a and armaan's current age be b.
(a-5) = 3* (b-5)
i.e. a= 3b-10 -(i)
10 years later,
(a+10) = 2(b+10)
i.e. a=2b+10 -(ii)
From eqn (i) and (ii),
b=20,
and a=50
8 0
2 years ago
Read 2 more answers
Write the Python programs for the
ArbitrLikvidat [17]

Answer:

num = int(input("Enter a number: "))

if (num % 2) == 0:

print("{0} is Even number". format(num))

else:

print("{0} is Odd number". format(num))

4 0
3 years ago
What is a recent technological breakthrough with an impact that can be compared to the invention of paper nearly 2,000 years ago
Evgesh-ka [11]
<span>Electronic communication</span>
3 0
3 years ago
Explain the principles of computer applications ​
9966 [12]

Answer:

The nature of computers and code, what they can and cannot do.

How computer hardware works: chips, cpu, memory, disk.

Necessary jargon: bits, bytes, megabytes, gigabytes.

How software works: what is a program, what is "running"

How digital images work.

Computer code: loops and logic.

Big ideas: abstraction, logic, bugs.

3 0
3 years ago
Other questions:
  • Consider the following sequence of items 10, 36, 25, 54, 37, 12, 75, 68, 42, 86, 72, 90. Insert these items in the order above,
    5·1 answer
  • Write a Python program to do the following: (a)Use a for loop and a random integer generator to generate 5 random integers in 1
    10·1 answer
  • type of weapon of mass decruction taht spreads deadly radioactive material by way of conventinal explosion
    15·1 answer
  • Each time the user selects an item from a list box in a web page, a postback occurs, the web page will redisplay, and the page_l
    12·1 answer
  • Ergonomically designed workstations and equipment reduce stress-related injuries and improve the productivity and efficiency of
    13·2 answers
  • 1)When the liquid is spun rapidly, the denser particles are forced to the bottom and the lighter particles stay at the top. This
    10·1 answer
  • The command to get out of the loop.<br>a.<br>i exit<br>ii. break<br>iii. comment<br>iv. for​
    12·1 answer
  • What do you do when you have computer problems? Check all that apply. PLEASE HELP
    9·2 answers
  • The terms Apps and Applications can be used interchangeably about software installed
    8·1 answer
  • 50 ) What is the cell address of 4th row and 4th column? A) 4D B) E4 оооо C) 04 D) B4​
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!