Ask Question
5 May, 14:18

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.

+3
Answers (1)
  1. 5 May, 16:49
    0
    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)
Know the Answer?
Not Sure About the Answer?
Get an answer to your question ✅ “Four int variables, x1, x2, y1, and y2, have been declared and been given values. write an expression whose value is the difference between ...” in 📙 Mathematics if there is no answer or all answers are wrong, use a search bar and try to find the answer among similar questions.
Search for Other Answers