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
Pls answer will give brainlest dont answer if you dont know
abruzzese [7]
The main source of agricultural methane is a process called enteric fermentation, a normal part of digestion in ruminant animals such as cows, sheep, goats, buffaloes and camels. Ruminants have a compartment in their stomach called a rumen where food is broken down through fermentation. This process produces methane gas, which the animals then belch out into the atmosphere. Enteric fermentation accounts for 18 percent of all anthropogenic methane emissions.

If enteric fermentation is a natural part of ruminant digestion, then what’s the solution? One strategy is to adjust the feed mix. The harder a food is to digest, the more time it spends in the rumen and the more methane that is produced. Some supplements can help as well. A recent study in Wales found that garlic may cut methane emissions.

The other major source of methane from farm animals is manure – particularly when stored in uncovered tanks or lagoons. Cow paddies sprinkled across a field of grass are exposed to the air where they quickly dry out. In tanks and lagoons (used because feedlots contain so many animals), lack of oxygen increases the amount of methane that’s emitted.

One way to handle the problem is through anaerobic digestion of manure stored in closed vessels. The captured methane can be used to generate heat and electricity. The 7,000+ dairy and swine operations in the U.S. could generate enough electricity to power nearly 600,000 homes annually, preventing the release of 1.3 million tons of methane into the atmosphere (see EPA report [PDF]). As an added benefit, the digested manure can be used as a fertilizer. (Raw manure also is used as fertilizer, but has a much stronger odor.) Since producing synthetic fertilizer burns a lot of fossil fuel energy, fertilizing with manure is a way to reduce greenhouse gas emissions as well as save money.


Don’t know how many words... plz give me brainiest
8 0
3 years ago
How to count how many uppercase letters in sentence in python?
Oksanka [162]

Answer:

the two count variables to 0. 3. Use a for loop to traverse through the characters in the string and increment the first count variable each time a lowercase character is encountered and increment the second count variable each time a uppercase character is encountered.

4 0
3 years ago
John wants to access specific programs from the Start menu in his laptop. However, he is unable to view them when he clicks the
Helen [10]
I believe the answer is C, to get to the program he would either reset his laptop or right click then run.
6 0
3 years ago
Read 2 more answers
Plz show working for binary addition. please solve. 11000 + 110101 + 101011​​
IrinaVladis [17]

Answer:

thats would be 222112 <3

Explanation:

t

5 0
3 years ago
Read 2 more answers
The windows troubleshooting utility that identifies and eliminates nonessential files is called _____.
Virty [35]
I think it is Defragment
8 0
3 years ago
Read 2 more answers
Other questions:
  • ____ repeatedly sends a cluster of three packets starting at the first router connected to a computer, then the next, and so on,
    12·1 answer
  • Microsoft windows is the least used operating system true or false?
    15·2 answers
  • What is information reach? A. A global public network of computer networks that pass information from one to another using commo
    5·1 answer
  • Dfd symbols are referenced by using all ____ letters for the symbol name.
    9·1 answer
  • Without a well-designed, accurate database, executives, managers, and others do not have access to the ____________________ they
    15·1 answer
  • What do you think the need for so many different form factors and server types are?
    13·1 answer
  • How to solve 3(x - 2) = 9x<br><img src="https://tex.z-dn.net/?f=3%28x%20-%202%29%20%3D%209x" id="TexFormula1" title="3(x - 2) =
    14·1 answer
  • Which of the following controls will provide an area in the form for the user to enter a name? a. button b. label c. text box d.
    8·1 answer
  • Examine the weather map.
    12·2 answers
  • Project: Digital Media and Business
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!