answer.
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
nlexa [21]
2 years ago
10

Assuming that the valid cost should be between 100 and 200, does the following code snippet test this condition correctly?

Computers and Technology
1 answer:
schepotkina [342]2 years ago
8 0

Answer:

  • No, Only the value between 100 and 200 can not test the code correctly.
  • This code snippet ensures that the cost value is between 100 and 200.

Explanation:

  • The above code has three condition test- if, else-if and else.
  • The first condition is true for the value which is a minimum of 100.
  • The else if condition is true for the value which is maximum from 200.
  • Then the else condition is used when the if and else if condition is false.
  • when the user gives the value between 100 and 200 then it will test that the value lies between 100 or 200.
  • To test the whole scenario there must be one value is less than 100 and greater than 200.
You might be interested in
in a small office, there are 5 computers, a network printer, and a broadband connection to the internet. what devices are needed
Nataly [62]

Answer:

<em>Ethernet cables, Network Adapters, Modem, Routers, Switches.</em>

Explanation:

<em>The devices that are required in setting up a wired network for the 5 computer comprises of the following devices </em>

  • <em>Ethernet Cables</em>
  • <em>Network Adapters</em>
  • <em>Modem/Router</em>
  • <em>Network Switch</em>

<em>Ethernet cables: They are called network cables or RJ-45 cables used to in connecting two or more computers together. it has different categories called, the untwisted pair and twisted pair Ethernet, with a speed from 10-1000</em>

<em>Network Adapters : This adapters allows a computer device to connect and interface with a network computer</em>

<em>Modem/Routers : A router is a device that that sits in the  middle  between your local computers and modems. it takes receives information or gets information from the modem and delivers it to the computer</em>

<em>Network switch: it connects more than two computers together to a network and share data among themselves and other devices on the network</em>

6 0
2 years ago
Write a program that defines a type for a structure that stores information on a student in ENG EK 125. Declare two variables to
Mashcka [7]

Answer:

Following are the program in the C Programming Language.

#include<stdio.h> //header file

#include<string.h> //header file

struct student//creating structure

{

 //set integer variables

int marks;

int roll;

};

//define function

void initial(struct student *stu)

{

 //set integer type variables

int marks=420;

int roll_no=45,i;

stu->marks=marks;//assigning the values

stu->roll=roll_no;//assigning the values

}

//define main method to call the function

int main()

{

struct student stu;

initial(&stu);//calling the function

printf("Total marks : %d\n",stu.marks); //print output

printf("Roll No. : %d\n",stu.roll); //print output

return 0;

}

<u>Output:</u>

Total marks : 420

Roll No. : 45

Explanation:

Here, we define the structure "student" with a struct keyword for creating a structure.

  • inside the structure, we set two integer type variable "marks", "roll".

Then, we define a function "initial()" and pass an argument in the parameter of the function.

  • inside the function, we set two integer type variable "marks", "roll_no" and assign the value in the variable "marks" to 420 and variable "roll_no" to 45.
  • Assign the value in the structure's integer variables from the function's variable.

Finally, we set the main method inside it we call the function "initial()" and pass the value and then, we print the output with message.

8 0
2 years ago
1⁰=?<br> Is equal to...........
Murrr4er [49]

Answer:

1

Explanation:

Anything to the 0th power is 1. However, 0⁰ is undefined.

5 0
2 years ago
Read 2 more answers
A computer has 4 GB of RAM of which the operating system occupies 512 MB. The processes are all 256 MB (for simplicity) and have
Afina-wow [57]

Answer:

1-p^{14} = 0.99

p^{14}= 0.01

p =(0.01)^{1/14}= 0.720

So then the value of the maximum I/O wait that can be tolerated is 0.720 or 72 %

Explanation:

Previous concepts

Input/output operations per second (IOPS, pronounced eye-ops) "is an input/output performance measurement used to characterize computer storage devices like hard disk drives (HDD)"

Solution to the problem

For this case since we have 4GB, but 512 MB are destinated to the operating system, we can begin finding the available RAM like this:

Available = 4096 MB - 512 MB = 3584 MB

Now we can find the maximum simultaneous process than can use with this:

\frac{3584 MB}{256 MB/proc}= 14 processes

And then we can find the maximum wait I/O that can be tolerated with the following formula:

1- p^{14}= rate

The expeonent for p = 14 since we got 14 simultaneous processes, and the rate for this case would be 99% or 0.99, if we solve for p we got:

1-p^{14} = 0.99

p^{14}= 0.01

p =(0.01)^{1/14}= 0.720

So then the value of the maximum I/O wait that can be tolerated is 0.720 or 72 %

3 0
1 year ago
Your network administrator finds a virus has been successfully inserted into the network software. The virus itself is now consi
Svetlanka [38]

Answer: Vulnerability of

Explanation:

The network administrator was able to identify that virus before it led to denial of service to users. Since it has been discovered, it is no longer a threat as measures will be taken to eliminate it. But a virus that was successful uploaded shows how vulnerable the system is or how bad the security protections put in place are. Steps has to be taken to ensure it does not reoccur.

7 0
1 year ago
Read 2 more answers
Other questions:
  • Gabe wants to move text from one document to another document. He should _____.
    10·2 answers
  • A computer’s memory is composed of 8K words of 32 bits each. How many bits are required for memory addressing if the smallest ad
    10·1 answer
  • Select the examples that best demonstrate likely employers for Journalism and Broadcasting workers. Check all that apply.
    11·2 answers
  • __________ access control is a form of __________ access control in which users are assigned a matrix of authorizations for part
    8·1 answer
  • In cell E6, create a formula to calculate the percentage of total sales accounted for by DVDs. The formula will divide DVD sales
    15·1 answer
  • Use the single-server drive-up bank teller operation referred to in Problems 1 and 2 to determine the following operating charac
    10·1 answer
  • Universal Containers (UC) uses a custom object called Vendor. The Vendor custom object has a Master-Detail relationship with the
    10·1 answer
  • Write an expression that continues to bid until the user enters 'n'.
    9·1 answer
  • Which is the correct notation to specify the following inheritance?
    8·1 answer
  • there is a structure called employee that holds information like employee code, name, date of joining. Write a program to create
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!