rockonavabrooke1051 rockonavabrooke1051
  • 24-02-2018
  • Mathematics
contestada

Four int variables, x1, x2, y1, and y2, have been declared and been given values. write an expression whose value is the difference between the larger of x1 and x2 and the smaller of y1 and y2.

Respuesta :

MrsWilliams18
MrsWilliams18 MrsWilliams18
  • 06-03-2018
Even though we are using variables, we still know that "difference" means subtraction. So, if the larger is x1 and x2, those variables go first. The smaller, y1 and y2 will go second. So our problem will look like this:

(x1 <  x2 ? x2 : x1) - (y1 < y2 ? y1 : y2)
Answer Link

Otras preguntas

Writers can use blank to build suspense
What is a common greenhouse gas containing only hydrogen and oxygen?
Is J. Evans male or female? How can you tell? How many chromosomes does J. Evans have?
A parabola is defined by the equation (x − 5)2 = 12(y + 2). In which direction will the parabola open? upward downward right left
If a political party puts the party agenda above the needs of the people it is known as
The following graph describes function 1, and the equation below it describes function 2: Function 1 graph of function f of x equals negative x squared plus 8 m
An attempt to exploit a vulnerability of a computer or network component is the definition of ________.
Which of the following is an example of an appeal to ethics? "I have read that one out of every seven adults is unable to read today." "The minds and hearts o
HELP!! 50 POINTS !! Read the following excerpt taken from the US Supreme Court case Plessy v. Ferguson (1896). The case coming on for a hearing before the Supr
During dehydration synthesis, a ________ molecule is produced.