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]
4 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]4 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
What are procedures that help keep a data base current
Veseljchak [2.6K]

File maintenance supports adding, modifying, or deleting records, as well as creating backup copies of the database

5 0
3 years ago
Read 2 more answers
What is indirect program memory addressing? Explain the working of the following instructions?
Elanso [62]
  • Indirect main memory addressing is described as the method in which the variable's address is stored in a mind register and also a command is utilized to point towards the memory registers which hold the register.
  • Instruction is used to direct towards a register that displays the results of the variables.
  • The register, in turn, refers to that variable's address in simplistic words. As just a result, it is indeed considered a passive program, memory address.

The instructions operate as follows:

a)

JMP AX :

  • The JMP instruction is being used to execute an unconditional jump.
  • AX is indeed the label's name.
  • JMP AX codes are being used to transfer control of the flow program to the AX label.

b)

JMP LIST:

  • The JMP command can be used to execute an unconditional jump, JMP LIST[DX] is the label's name.  
  • The JMP LIST[DX] program is being used to transfer control of its flow programs to the specified section.
  • It is the segment to which the flow control is transmitted.

c)

JMP NEAR PTR[DI+3]: 

  • Unconditional jumps could be done with the JMP command as you'll see, the label is JMP NEAR PTR[DI+3].
  • It's being used to transmit flow control to a particular section, throughout this case [DI+3].
  • The close keyword indicates that perhaps the code segment would be in the line of code being nearby.

Learn more:

brainly.com/question/20320915

4 0
3 years ago
during zach's second visit of the year, he incurred a $450 bill. Describe how much is paid by Zach and the insurance carrier
icang [17]
Idk just need points
6 0
3 years ago
One reason it is important to write code that is readable is that
kramer

Answer:

The answer is D:)

Explanation:

D) it makes it easier to follow when revisions or updates are called for.

8 0
4 years ago
Read 2 more answers
Iii. Write the pseudocode for a program to take two integer inputs and the operator from user and
Katen [24]

Answer:

The pseudocode is as follows:

Input num1, num2

input operator

print num1 + num2

print num1 - num2

print num1 * num2

if num2 != 0

    print num1 / num2

else

    print "Cannot divide by 0"

Explanation:

This gets input for both numbers

Input num1, num2

This gets input for the operator

input operator

This prints the sum

print num1 + num2

This prints the difference

print num1 - num2

This prints the product

print num1 * num2

This prints the division if the divisor is not 0

<em>if num2 != 0</em>

<em>     print num1 / num2</em>

<em>else</em>

<em>     print "Cannot divide by 0"</em>

<em />

6 0
3 years ago
Other questions:
  • What is the last step when supervising detainee operations ssd1?
    14·1 answer
  • Using the expected format, of putting key information where the reader can’t find it, is an example of?
    8·2 answers
  • Identify four basic data manipulations performed on a relational database using sql
    7·1 answer
  • A java program that calculates the balance of three months of $1000 and interest rate 6%
    9·1 answer
  • If the executives for Office Max LLC, a chain of office supply stores, developed the chain's objectives by asking buyers and sto
    11·1 answer
  • Which among the following choices is correct based on the two statements listed below? Statement 1: When the lexical analyzer sc
    12·1 answer
  • Why people shouldnt get married​
    6·1 answer
  • System.out.print(two.indexOf('r'));
    8·2 answers
  • Will give brainliest
    14·1 answer
  • During the POST process, the BIOS uses two (2) different ways to notify you of a problem, Error beep codes and error messages, e
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!