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

Which of the following is characteristic of an ethnic religion? a.) The religion has spread far beyond its hearth. b.) The religion is not focused on a particu
Solve 2(6x-6)= -2(-5x+9)
Which relation is a function?
Rewrite the equation for x, and express its value in terms of a. 3/ax-4=20
how can ABC be mapped XYZ? first pull down is either vertex X, vertex Y, or vertex Z?
Four characteristics of exposition
When a photograph is taken, the exposure time, t is directly proportional to the square of the size, f , of the opening in the camera lens. t = 0.02 when f =
find a slope of a line that passes through the points (0,-4) and (-3,2)
APPLYING MAIN IDEAS What is the most important power of Congress? a. fix standard weights and measures c. make the nation’s laws b. establish post offices d. bo
Scientific investigation starts with an observation of a natural phenomenon or problem. What observation prompted the family to conduct a scientific investigati