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

whats the most accurate estimation of 65+77
please explain how to solve this  On Monday,it took Helen 3 hours to do  a page of science homework exercises.The next day she did the same number of exercises
why did people immigrate to the United States in the late 1800s?
whats the most accurate estimation of 65+77
please explain how to solve this  On Monday,it took Helen 3 hours to do  a page of science homework exercises.The next day she did the same number of exercises
whats the most accurate estimation of 65+77
''Life in a city is more rewarding than life outside a city."List two or three arguments in favor of this opinion and two or three arguments opposing this opini
A pencil measures 14 cm long. How many millimeters long is it?
''Life in a city is more rewarding than life outside a city."List two or three arguments in favor of this opinion and two or three arguments opposing this opini
''Life in a city is more rewarding than life outside a city."List two or three arguments in favor of this opinion and two or three arguments opposing this opini