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

1% of what number is 7
HELP!?! PLEASE!! Which pair of fractions shows 7/9 and 5/12 correctly converted with their least common denominator?A.28/36 and 15/36B.34/36 and 29/36C. 56/72
Some animals, but not humans, have an organ called a gizzard located near the top of their digestive tract. This organ is small and can contain small rocks. It
The Indonesian name for Borneo is A. Sulawesi. B. Brunei. C. Irian Jaya. D. Kalimantan.
read the excerpt from Part 1 of The Odyssey by Homer.My home is on the peaked sea-mark of Ithacaunder Mount Neion's wind-blown robe of leaves, in sight of other
Where do many of the cell's metabolic processes take place?
Why is the energy transfer in a food web inefficient?
How many 2/3 cup servings are in 1/2 cup of apple juice?
Which of the following functions can plants and animal cells both perform? A: locomotion B:photosynthesis C:reproduction or D: oxygen production
How many molecules of water are there in 5.00 g sample of water ?