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

The Speedy Fast Ski Resort has started to keep track of the number of skiers and snowboarders who bought season passes.The Ratio of the number of skiers who bou
write this in km 2000m
"find values of a and b that make the statement |a+b|=|a| + |b| false"
"find values of a and b that make the statement |a+b|=|a| + |b| false"
How do you find the derivative of y=ln(cos(x))y=ln(cos(x)) ?
how many chromosomes does a coyote have
Convert 28/50to a percent
How do you solve 3/4n -18 = 1/4n -4
A horizontal line through point -7,8
How do you solve 3/4n -18 = 1/4n -4