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
vfiekz [6]
4 years ago
8

2.Write an if /else if statement that carries out the following logic. If the value of variable quantityOnHand is equal to 0, di

splay the message ''Out of stock''. If the value is greater than 0, but less than 10, display the message ''Reorder ''. If the value is 10 or more do not display anything.
Computers and Technology
1 answer:
Oliga [24]4 years ago
5 0

Answer:

if(quantityOnHand == 0) { cout<<"Out of stock"; }

else if(quantityOnHand > 0 && quantityOnHand <10) { cout<<"Reorder "; }

else if(quantityOnHand >= 10){ }

See Explanation for comments

Explanation:

//This program segment is written in C++

//Only required segment is written

// Comments are used for explanatory purpose

// Program Segment starts here

/*

The following condition tests if quantityOnHand equals 0

If this condition is true, the program prints "Out of stock" without the quotes

*/

if(quantityOnHand == 0) { cout<<"Out of stock"; }

/*

The following condition tests if quantityOnHand  is greater than 0, but less than 10

If this condition is true, the program prints "Reorder " without the quotes

*/

else if(quantityOnHand > 0 && quantityOnHand <10) { cout<<"Reorder "; }

/*

The following condition tests if quantityOnHand  is greater than o equal to 10

If this condition is true, nothing is done

*/

else if(quantityOnHand >= 10){ }

// End of program segment

Assumption: <em>The program assumes that variable </em>quantityOnHand has already been declared

You might be interested in
Choose the word that best completes this sentence. ____________ should cover every part of the worksite.
Evgen [1.6K]
Since you provide no choices, here are several things that should cover every part of the worksite :
- Emergency exit
- Safety measures

Hope this helps
5 0
3 years ago
Read 2 more answers
Technician A says that a system should be recharged with refrigerant until the condenser temperature is equal to the ambient tem
Reptile [31]

Answer:

Technician B

Explanation:

The vehicle will always come with a sticker placed under the hood of the AC unit. This sticker has information like the amount of ounces or pounds required for a complete charge. The car’s gauge will state the psi with most gauges having a color bar on the face the appropriate pressure.

6 0
3 years ago
Windows Rights Management Services is used in conjunction with which Microsoft applications?
Mariana [72]
“Word” is your answer
6 0
3 years ago
What best describes "broadband access"?
Andre45 [30]

Answer:

The Correct option is : d. BROADBAND ACCESS enable users to connect to a high speed networks

Explanation:

As the names implies BROADBAND ACCESS can be defined as a technology that enables users to have the access to fast and high speed internet connection when browsing, streaming or downloading reason been that BROADBAND ACCESS is more faster and quicker which inturn enables the user to do a lot more on the internet which is why BROADBAND ACCESS is often refer or known as a high and fast speed Internet access connection.

5 0
3 years ago
Which type of memory helps in reading as well as writing data?
Anuta_ua [19.1K]

The read-write type of memory helps in reading as well as writing data. This computer memory is used by users to continually update the data (to access (read from) or alter (write to) ) that is held on hardware storage devices. Internal or external hard disk drives, rewritable CDs or small flash drives can be all physical setups of read-write memory.

6 0
3 years ago
Other questions:
  • I just started game development using unity, I’m trying to control my sphere moving on a flat surface using the W,A,S,D keys, if
    11·1 answer
  • Which wireless device does the manager most likely have before being offered the upgrade by her supervisor?
    8·2 answers
  • What can you do with someone's ip address?
    9·1 answer
  • The TabIndex value assigned to a text box's identifying label must be _______________ for the text box's access key to work corr
    14·1 answer
  • What is the maximum upload speed you can get on an isdl internet connection?
    9·1 answer
  • __________ is a protocol used by e-mail clients to download e-mails to your computer.
    14·1 answer
  • 1. Es un símbolo que indica que se ha de realizar cierta operación específica entre uno o varios
    6·1 answer
  • How can presentation software be used in a
    10·2 answers
  • What is the outcome when a floating-point number is divided by zero?
    12·1 answer
  • You are trying to sell a new product to a store owner. Which method of presentation
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!