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

Estimate the volume by rounding to whole centimeters. A) 5 cm3 B) 6 cm3 C) 7 cm3 D) 8 cm3
Find the value of x round to the nearest tenth if needed
4 claims please I need those for tomorrow
22) Which statement regarding the era of Reconstruction is FALSE? A) the 13th Amendment outlawed slavery in all American states B) state laws and customs u
A rectangle has a perimeter of 22 centimeters. The length of the shortest side is 3 centimeters. What is the length of the longest side? A)    7 cm B)    5 cm
what is the gcf of 15 and 35
average time to process a sale is 14 minutes. You have to decrease that by 25% this month in order to meet your goals
In the first three stanzas of "We Are Many," how does Neruda see himself? Question 12 options: brave and smart single and attractive foolish and cowardly
all in the picture thanks
Losing ________ or fewer per week is a healthy rate of weight loss.