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
Bingel [31]
3 years ago
6

Assume that an int variable is Quadrilateral has been declared, and that another int variable, number Of Sides has been declared

and initialized. Write a statement that assigns the value 1 if number Of Sides is exactly 4 and 0 otherwise.
Computers and Technology
1 answer:
kondor19780726 [428]3 years ago
4 0

Answer:

The answer to this question can be given as:

Statement:

isQuadrilateral = (numberOfSides == 4) ? 1 : 0;

//check condition using ternary operator.

Explanation:

we know that both(Quadrilateral, numberOfSides) is already declared in the program. So the statement for check condition is (isQuadrilateral = (numberOfSides == 4) ? 1 : 0;). To check this condition we use the ternary operator. In this operator, we also check another condition. The syntax of ternary operator (condition ? value_if_true : value_if_false).In this statement on the lift side we use the variable for check condition and right side we check condition if the value is true it prints 1 else it will print 0.

You might be interested in
Which is a natural hazard that can cause extinctions? Choose all that apply.
solong [7]
All of them can play a role in extinction
7 0
3 years ago
Which of the following parameters should match in order for a pair of routers to form an adjacency when running OSPFv2? (Points
Gnom [1K]

Answer: Subnet mask

Explanation:

 Subnet mask is the type of parameter that should be match in order to form the adjacency for running the OSPFv2. The subnet mask is mainly used to identifying the address of network in the system.

The OSPF enable the router that must form an adjacency with the neighbors before sharing any type of data.

It mainly determine the neighbors links in the OSPF. The OSPFv2 router send the special type of message which is known as hello packet in the network.  

 

4 0
3 years ago
Quired to the weight
expeople1 [14]

Answer:

The mechanical advantage is 0.25

This mechanical advantage shows that the force at which the deodorant sprays is the quarter of the applied effort, and hence the efficiency of your finger as a machine is 25%.

Explanation:

Given;

output force, F₂ = 15 N

input force, F₁ = 60 N

Mechanical advantage also known as force ratio is defined as the ratio of the output force (load) to the ratio of input force (effort).

M.A = \frac{0utput \ Force}{1nput \ Force} \\\\M.A = \frac{15 \ N}{60 \ N} \\\\M.A = 0.25

This shows that the force at which the deodorant sprays is the quarter of the applied effort, and hence the efficiency of your finger as a machine is 25%.

3 0
3 years ago
What is the least number of bits you would need to borrow from the network portion of a Class B subnet mask to get at least 130
Tatiana [17]

Answer: Eight

Explanation:

A class B address is 255.255.0.0. We need to borrow 8 bits from the network portion to have atleast 130 host per subnet.

11111111.00000000.00000000.00000000

8 0
3 years ago
What is a stereo type?
Aleks04 [339]

Hello!

A stereotype is a generalized belief about a particular category of people.

 

3 0
3 years ago
Read 2 more answers
Other questions:
  • What is the primary purpose for a screen saver in windows?
    8·1 answer
  • During the charging of a storage battery, what is the temperature that the electrolyte solution must never exceed?
    6·1 answer
  • How do you change brightness on acer laptop?
    7·1 answer
  • Which of the following is an example of a direct payment subsidy?
    12·1 answer
  • An extranet is like an intranet except that it allows company employees access to corporate Web sites from the ______
    13·1 answer
  • Implement the function printTwoLargest that inputs an arbitrary number of positive numbers from the user. The input of numbers s
    14·1 answer
  • What is the second step when designing an algorithm?
    12·2 answers
  • What is a trojan horse
    8·2 answers
  • Type the correct answer in the box. Spell all words correctly.
    11·1 answer
  • A small square at the right corner of the table is what?​
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!