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 English words contains the sound closest to the Spanish “I”? a. icicle b. eagle c. igloo Please select the best answer from the choic
which of the following graphs is the set of -10<3x-4<8
what is the mass of an object that has a density of 0.7 g/cm3 and a volume of 8cm3? (the density of an object has the equation d=m/v) A.7.3g B.5.6G C.0.18G D.11
Which reflex is NOT controlled by the brain stem? A. urination B. vomiting C. sneezing D. swallowing E. salivating
Maria has 3/4 pounds of trail mix. She needs to share it equally among 6 friends. How much will each friend be given?
wha reason did the national labor relations act give for allowing labor unions to form?
Does someone know the answer?
What is the exact situation to the equation e^4x-1=3 (In picture)
How are members of the party-in-the-electorate selected? A. by party leaders B. by social class C. by themselves D. by race or ethnicity
There are 0.3 moles of xenon gas in a 0.5-liter container at 30 degrees C. What is the pressure exerted by the xenon gas