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
Which describes a design theme in PowerPoint? a set of elements that unify the slides and complement the topic a printed handout
rosijanka [135]

a set of elements that unify the slides and complement the topic

8 0
3 years ago
Read 2 more answers
Do you agree that technology is always at the advantageous side wherein it only results in good things?
Crazy boy [7]

Answer:

No, think about mass surveillance in China (and in USA!), and the "social credit" system.

4 0
3 years ago
Its an HTML5 anyone kwons
Aleksandr [31]

Answer:

1 will be stored in result

Explanation:

Given

The lines of code

Required

Determine the value stored in result

The value stored in result is determine by the condition (x<3 && y ==6)

In the first line, the value of x is 2 and the value of y is 6

So: x<3 is true because x = 2 and 2 is less than 3

y == 6 is also true because y = 6 and 6 is equal to 6

So, the condition (x<3 && y ==6) is true and true will be saved in variable result

Because result is a Boolean variable which can only take true or false value

1 represents true

0 represents false

<em>So, 1 will be stored in result</em>

7 0
3 years ago
The following is part of a log file taken from the machine on the network with the IP address of 192.168.1.106:__________.
Phantasy [73]

Answer:

Port scan targeting 192.168.1.106.

Explanation:

In the following question, there is some part of the question and options is missing.

In the following statement, when a file log is taken from the computer system which has Internet Protocol address is given in the statement and by the further details of the statement in which time and the port destination by examine those details of the Internet Protocol, the following port scan targeting the IP address 192.168.1.106.

3 0
3 years ago
What does anti-malware software look for to determine that a program or a process is a virus?
Kryger [21]
Certain extensions of files. Sometimes, the name of the file could be something like Trojanx64.sys(I think). I had a few files of malware, but they were deleted. I believe the most common extension is .sys for viruses. Additionally, antivirus software could look into the properties of the program/process.
3 0
3 years ago
Other questions:
  • While reading his favorite outdoor sports magazine, Jeff sees an advertisement for a new camping tent that is designed for quick
    12·2 answers
  • Which group on the Home Ribbon allows you to add shapes to a PowerPoint slide?
    10·2 answers
  • Windows domain policy to disable windows 10 update
    7·1 answer
  • The______for our newest game keeps changing as we develop our concept and refine our goals.
    11·2 answers
  • Anyone Free to Talk??????? I'm Bored :(
    6·2 answers
  • You work for a retail clothing chain whose primary outlets are in shopping malls and are conducting an analysis of your customer
    13·1 answer
  • Write a 200 word essay about how a computer is made.<br><br>Good luck.​
    9·1 answer
  • You will need to convert the following binary numbers to hexadecimal. Table 1 contains 16 problems. The first one is completed f
    7·1 answer
  • Explain how you would set up a Demilitarized Zone on. You have 25 workstations and a server on your site. Explain what additiona
    5·1 answer
  • Which statement best describes how the programming layer of abstraction in
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!